74% wp-author-ranking

Code Review | WP Author Ranking

WordPress plugin WP Author Ranking scored74%from 54 tests.

About plugin

  • Plugin page: wp-author-ranking
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 4, 2014
  • Latest release: Oct 3, 2014
  • Number of updates: 21
  • Update frequency: every 1.4 days
  • Top authors: minojiro (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,916 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.71ms] Passed 4 tests

A check of server-side resources used by WP Author Ranking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.82 ▼0.58
Dashboard /wp-admin3.34 ▲0.0443.84 ▼2.22
Posts /wp-admin/edit.php3.40 ▲0.0441.93 ▼2.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.29 ▼11.79
Media Library /wp-admin/upload.php3.27 ▲0.0432.04 ▼2.60
WP Author Ranking /wp-admin/options-general.php?page=wp-author-ranking/index.php3.2433.01

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 9 new files
Database: 1 new table, 8 new options
New tables
wp_author_ranking
New WordPress options
wpAuthorRanking_countUU
db_upgraded
wpAuthorRanking_countSingle
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Author Ranking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.44 ▼0.111.71 ▲0.1343.79 ▲3.56
Dashboard /wp-admin2,193 ▲195.57 ▼0.0381.93 ▼4.7340.03 ▼6.25
Posts /wp-admin/edit.php2,104 ▲42.00 ▲0.0533.39 ▼1.8137.02 ▼7.55
Add New Post /wp-admin/post-new.php1,529 ▼223.74 ▲0.67592.46 ▼46.4953.79 ▼8.18
Media Library /wp-admin/upload.php1,407 ▲104.20 ▲0.02102.48 ▲4.5843.95 ▲0.81
WP Author Ranking /wp-admin/options-general.php?page=wp-author-ranking/index.php8512.0224.7923.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_author_ranking
  • This plugin does not fully uninstall, leaving 8 options in the database
    • wpAuthorRanking_countSingle
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpAuthorRanking_countUU

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-author-ranking/index.php:22
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-author-ranking/index.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function date_i18n() in wp-content/plugins/wp-author-ranking/setting.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The setting menu.) image not found
The official readme.txt is a good inspiration

wp-author-ranking/index.php 92% from 13 tests

The primary PHP file in "WP Author Ranking" version 1.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-author-ranking.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected350 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP21810201
Markdown129081
PO File221468

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.23KB19.36KB▼ 4.27%