10% original-post-ranking-widget

Code Review | Original Post Ranking Widget

WordPress plugin Original Post Ranking Widget scored10%from 54 tests.

About plugin

  • Plugin page: original-post-ran...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2012
  • Latest release: May 16, 2013
  • Number of updates: 5
  • Update frequency: every 42.8 days
  • Top authors: gqevu6bsiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,440 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/original-post-ranking-widget/original-post-ranking-widget.php+228
    Methods with the same name as their class will not be constructors in a future version of PHP; original_post_ranking_widget_cls has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼51.22ms] Passed 4 tests

A check of server-side resources used by Original Post Ranking Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.187.69 ▼30.27
Dashboard /wp-admin2.30 ▼1.0410.72 ▼50.73
Posts /wp-admin/edit.php2.30 ▼1.0512.93 ▼33.39
Add New Post /wp-admin/post-new.php2.30 ▼3.5810.57 ▼90.50
Media Library /wp-admin/upload.php2.30 ▼0.929.90 ▼27.57
Original Post Ranking Widget /wp-admin/options-general.php?page=original_post_ranking_widget2.3111.02

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_original_post_ranking_cls
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Original Post Ranking Widget: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.24 ▼0.321.52 ▼0.1040.52 ▼4.31
Dashboard /wp-admin2,196 ▲165.54 ▼0.0789.27 ▼0.2437.81 ▼4.95
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0038.73 ▲2.0936.15 ▼2.58
Add New Post /wp-admin/post-new.php1,534 ▼14522.86 ▲0.70637.03 ▼19.5952.55 ▲3.68
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.0495.56 ▼2.1941.20 ▼2.97
Original Post Ranking Widget /wp-admin/options-general.php?page=original_post_ranking_widget9982.0725.4829.59

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in original_post_ranking_widget_cls is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_original_post_ranking_cls
    • widget_recent-comments
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=original_post_ranking_widget
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in original_post_ranking_widget_cls is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/original-post-ranking-widget/original-post-ranking-widget.php:29

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=original_post_ranking_widget
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/original-post-ranking-widget/original-post-ranking-widget.js?ver=1.0.1:16:85)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=original_post_ranking_widget
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Interface in setting), #2 (Widget setting), #3 (Screen sitebar)
The official readme.txt might help

original-post-ranking-widget/original-post-ranking-widget.php 92% from 13 tests

"Original Post Ranking Widget" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin394 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP19940321
JavaScript118540
CSS13033

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity13.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png22.74KB9.66KB▼ 57.52%
screenshot-2.png43.65KB17.88KB▼ 59.05%
screenshot-1.png33.58KB16.19KB▼ 51.77%