58% rate-this-author

Code Review | Rate this Author

WordPress plugin Rate this Author scored 58% from 54 tests.

About plugin

  • Plugin page: rate-this-author
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.7
  • WordPress version: 6.3.1
  • First release: May 9, 2015
  • Latest release: Apr 7, 2021
  • Number of updates: 30
  • Update frequency: every 72.0 days
  • Top authors: Tech9logy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,997 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.47MB] [CPU: ▼42.31ms] Passed 4 tests

Analyzing server-side resources used by Rate this Author
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.53 ▼0.9416.14 ▼24.21
Dashboard /wp-admin2.54 ▼0.7716.41 ▼29.51
Posts /wp-admin/edit.php2.54 ▼0.8217.52 ▼31.62
Add New Post /wp-admin/post-new.php2.54 ▼3.3516.34 ▼83.89
Media Library /wp-admin/upload.php2.54 ▼0.6914.64 ▼20.89
Rate This Author /wp-admin/admin.php?page=rate-this-author-identifier2.5416.29
Settings /wp-admin/admin.php?page=rate-this-author-settings2.5417.68

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 25 new files
Database: 1 new table, 15 new options
New tables
wp_rate_this_author
New WordPress options
db_upgraded
can_compress_scripts
empty_email
valid_email
widget_recent-posts
duplicate_user
success_msg
widget_recent-comments
invalid_image
rate_author
...

Browser metrics Passed 4 tests

Checking browser requirements for Rate this Author
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,032 ▲28613.78 ▼0.6021.78 ▲20.0044.63 ▲3.63
Dashboard /wp-admin2,230 ▲455.83 ▼0.02142.52 ▲31.5154.53 ▲9.84
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0439.05 ▼2.0735.41 ▼1.77
Add New Post /wp-admin/post-new.php1,558 ▲4423.33 ▲5.67692.95 ▲11.8558.08 ▲2.10
Media Library /wp-admin/upload.php1,418 ▲274.23 ▼0.0496.56 ▼6.4142.62 ▼3.98
Rate This Author /wp-admin/admin.php?page=rate-this-author-identifier8462.0827.3730.28
Settings /wp-admin/admin.php?page=rate-this-author-settings8932.0324.5128.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Author_Rating_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie tables were found after uninstall: 1 table
    • wp_rate_this_author
  • This plugin did not uninstall successfully, leaving 15 options in the database
    • rtauth_table_version
    • valid_email
    • duplicate_user
    • empty_email
    • rate_author
    • widget_theysaidso_widget
    • invalid_image
    • success_msg
    • widget_author_rating_widget
    • image_error
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rate-this-author-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Author_Rating_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=rate-this-author-identifier
    • > Notice in wp-content/plugins/rate-this-author/includes/admin/list.php+53
    Undefined index: author_id

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rate-this-author/includes/front_rating.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rate-this-author/includes/admin/list.php:259
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 25
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 25
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rate-this-author/includes/form.php:173
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/rate-this-author/includes/memory-schema.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rate-this-author/includes/widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
You can take inspiration from this readme.txt

rate-this-author/rate-this-author.php Passed 13 tests

The principal PHP file in "Rate this Author" v. 1.4 is loaded by WordPress automatically on each request
68 characters long description:
A very simple and lightweight Plugin for rating authors by visitors.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,530 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS54391161,494
JavaScript574301,299
PHP723884737

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/stripe.png0.09KB0.12KB0.00%
images/stars.png3.85KB0.98KB▼ 74.52%