10% star-rate-for-administrators

Code Review | Star Rate for Administrators

WordPress plugin Star Rate for Administrators scored10%from 54 tests.

About plugin

  • Plugin page: star-rate-for-adm...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2013
  • Latest release: Oct 18, 2013
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: Slashhh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,280 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/star-rate-for-administrators/star-rate-for-administrators.php+177
    syntax error, unexpected 'else' (T_ELSE), expecting end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.51ms] Passed 4 tests

This is a short check of server-side resources used by Star Rate for Administrators
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.67 ▼2.51
Dashboard /wp-admin3.31 ▲0.0046.87 ▼6.51
Posts /wp-admin/edit.php3.36 ▲0.0045.27 ▼6.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.25 ▼14.23
Media Library /wp-admin/upload.php3.23 ▲0.0042.75 ▲5.54

Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Star Rate for Administrators: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.64 ▼0.634.75 ▲3.0738.89 ▼0.29
Dashboard /wp-admin2,224 ▲184.84 ▼0.03102.52 ▼0.8839.89 ▼2.26
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0233.77 ▼1.8935.09 ▼1.89
Add New Post /wp-admin/post-new.php1,531 ▼1423.44 ▲0.31680.97 ▲4.3555.39 ▲1.65
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.06116.00 ▲6.9848.31 ▲1.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Parse error
      syntax error, unexpected 'else' (T_ELSE), expecting end of file in wp-content/plugins/star-rate-for-administrators/star-rate-for-administrators.php on line 177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/star-rate-for-administrators/inc/stars.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (screenshot1.png A star rate inside a table, as seen to your users), #2 (screenshot2.png A star rate inside a header, as seen to your users), #3 (screenshot3.png Star Rate for Administrators viewed from the administation section)
The official readme.txt is a good inspiration

star-rate-for-administrators/star-rate-for-administrators.php Passed 13 tests

The entry point to "Star Rate for Administrators" version 1.0.0 is a PHP file that has certain tags in its header comment area
133 characters long description:
Star Rate for Administrators is an open source solution built for Wordpress to display several star rates puts for the administrator.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected398 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24143281
PO File13476117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.93KB32.43KB▼ 44.01%
img/stars/yellowE.png0.97KB0.86KB▼ 10.88%
img/stars/goldF.png3.75KB0.60KB▼ 84.09%
img/stars/goldE.png3.72KB0.57KB▼ 84.80%
img/stars/orangeE.png0.59KB0.37KB▼ 36.59%