84% rankingman

Code Review | RankingMan

WordPress plugin RankingMan scored 84% from 54 tests.

About plugin

  • Plugin page: rankingman
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.3.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2020
  • Latest release: Feb 3, 2020
  • Number of updates: 13
  • Update frequency: every 2.1 days
  • Top authors: hasudon7171 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.74ms] Passed 4 tests

Server-side resources used by RankingMan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1645.13 ▲3.45
Dashboard /wp-admin3.46 ▲0.1649.38 ▼1.29
Posts /wp-admin/edit.php3.57 ▲0.2247.93 ▼2.31
Add New Post /wp-admin/post-new.php6.04 ▲0.1597.52 ▼2.82
Media Library /wp-admin/upload.php3.38 ▲0.1637.33 ▲3.53
ランキングタグ /wp-admin/edit-tags.php?taxonomy=ranking_tag&post_type=wp_rman3.3833.54
ランキングカテゴリー /wp-admin/edit-tags.php?taxonomy=ranking_category&post_type=wp_rman3.3847.23
Add New /wp-admin/post-new.php?post_type=wp_rman3.5155.10
RankingMan /wp-admin/options-general.php?page=wp_rman_setup_page3.3336.39
ランキング /wp-admin/edit.php?post_type=wp_rman3.4237.90

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
wp_rman_user_setting
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by RankingMan
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11314.43 ▼0.151.82 ▼0.0341.39 ▲1.22
Dashboard /wp-admin2,248 ▲575.90 ▲0.00106.82 ▲6.1150.09 ▲6.33
Posts /wp-admin/edit.php2,128 ▲422.02 ▲0.0135.47 ▲0.6138.70 ▲8.36
Add New Post /wp-admin/post-new.php1,572 ▲3823.14 ▼0.22579.53 ▼89.2751.45 ▼4.63
Media Library /wp-admin/upload.php1,424 ▲334.24 ▲0.0292.39 ▼3.6145.41 ▼3.66
ランキングタグ /wp-admin/edit-tags.php?taxonomy=ranking_tag&post_type=wp_rman1,2702.1426.7739.50
ランキングカテゴリー /wp-admin/edit-tags.php?taxonomy=ranking_category&post_type=wp_rman1,3052.1428.6039.37
Add New /wp-admin/post-new.php?post_type=wp_rman2,6937.75191.3794.30
RankingMan /wp-admin/options-general.php?page=wp_rman_setup_page1,1792.0522.5193.51
ランキング /wp-admin/edit.php?post_type=wp_rman1,1001.9530.9844.91

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • wp_rman_user_setting

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rankingman/includes/functions-custom-post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/rankingman/ranking_man.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/rankingman/includes/functions-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rankingman/includes/functions-custom-param.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rankingman/includes/functions-plugin-settings.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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

rankingman/ranking_man.php 92% from 13 tests

The principal PHP file in "RankingMan" v. 1.0.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rankingman.php" instead of "ranking_man.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
Success! There were no dangerous files found in this plugin1,410 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS15826743
PHP513434667

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.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
30 PNG files occupy 0.21MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/type8_rank2.png5.10KB2.91KB▼ 42.87%
images/type10_rank3.png3.16KB1.75KB▼ 44.66%
images/type9_rank2.png9.10KB4.12KB▼ 54.74%
images/type2_rank1.png4.93KB4.83KB▼ 2.06%
images/type6_rank3.png3.37KB2.46KB▼ 26.94%