10% wp-ranking-pro

Code Review | WP-Ranking PRO

WordPress plugin WP-Ranking PRO scored10%from 54 tests.

About plugin

  • Plugin page: wp-ranking-pro
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Oct 20, 2017
  • Number of updates: 10
  • Update frequency: every 49.8 days
  • Top authors: plugmize (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,761 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-ranking-pro/wp-ranking-pro.php+83
    Function create_function() is deprecated

Server metrics [RAM: ▼1.38MB] [CPU: ▼54.91ms] Passed 4 tests

An overview of server-side resources used by WP-Ranking PRO
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.62 ▼0.848.66 ▼31.83
Dashboard /wp-admin2.64 ▼0.7110.74 ▼64.44
Posts /wp-admin/edit.php2.64 ▼0.729.83 ▼42.53
Add New Post /wp-admin/post-new.php2.64 ▼3.259.15 ▼80.85
Media Library /wp-admin/upload.php2.64 ▼0.5910.69 ▼26.63
WP-Ranking PRO /wp-admin/tools.php?page=wp-ranking-pro2.6510.42

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: 4 new tables, 10 new options
New tables
wp_wpr_views
wp_wpr_ranking
wp_wpr_views_per_day
wp_wpr_http_user_agents
New WordPress options
theysaidso_admin_options
wpr_db_version
widget_wpr_widget
wpr_exclusion_http_user_agent
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wpr_as_mobile_http_user_agent
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP-Ranking PRO
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲22313.30 ▼1.001.69 ▼0.0431.37 ▼12.21
Dashboard /wp-admin2,369 ▲1844.89 ▼0.92111.45 ▲1.4842.50 ▲4.30
Posts /wp-admin/edit.php2,090 ▲12.06 ▲0.0140.80 ▼0.3034.89 ▼1.88
Add New Post /wp-admin/post-new.php1,517 ▼1617.66 ▼5.67677.18 ▼3.7454.00 ▼5.19
Media Library /wp-admin/upload.php1,392 ▲74.24 ▲0.03106.65 ▼2.9546.11 ▼3.30
WP-Ranking PRO /wp-admin/tools.php?page=wp-ranking-pro9431.7127.2842.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/wp-ranking-pro/wp-ranking-pro.php+83
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpr_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=wp-ranking-pro
    • > Deprecated in wp-content/plugins/wp-ranking-pro/wp-ranking-pro.php+83
    Function create_function() is deprecated

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
Please take a closer look at the following
  • 23× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-ranking-pro/wp-ranking-pro.php on line 1845
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-ranking-pro/templates/help-samples.php:1
    • > PHP Notice
      Undefined variable: current_ranking in wp-content/plugins/wp-ranking-pro/templates/dashboard-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-ranking-pro/templates/ranking-1.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/wp-ranking-pro/lib/template-engine.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-ranking-pro/lib/model/ranking.php on line 3
    • > PHP Notice
      Undefined variable: current_ranking in wp-content/plugins/wp-ranking-pro/templates/dashboard-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-ranking-pro/templates/dashboard-table-default.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-ranking-pro/templates/ranking-1-inner.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-ranking-pro/templates/help-parameters.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function stripslashes_deep() in wp-content/plugins/wp-ranking-pro/templates/main-custom.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 Passed 29 tests

readme.txt Passed 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
10 plugin tags: posts, popular, post, ajax, shortcode...

wp-ranking-pro/wp-ranking-pro.php Passed 13 tests

This is the main PHP file of "WP-Ranking PRO" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
115 characters long description:
"WP-Ranking PRO" totals a page view, and into which a popular article can be formed by various elements or periods.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected5,336 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP227391904,157
PO File13340681
CSS2786369
JavaScript3328129

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity42.75
▷ Minimum class complexity3.00
▷ Maximum class complexity131.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods158
▷ Static methods10.63%
▷ Public methods9459.49%
▷ Protected methods00.00%
▷ Private methods6440.51%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thumb.png4.53KB1.53KB▼ 66.23%
images/arrow_up.png1.83KB0.24KB▼ 87.01%
images/add.png1.21KB0.27KB▼ 77.83%
images/arrow_down.png1.84KB0.24KB▼ 87.02%