10% wordpress-ping-optimizer

Code Review | WordPress Ping Optimizer

WordPress plugin WordPress Ping Optimizer scored10%from 54 tests.

About plugin

  • Plugin page: wordpress-ping-op...
  • Plugin version: 2.35.1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2011
  • Latest release: Aug 21, 2022
  • Number of updates: 78
  • Update frequency: every 50.8 days
  • Top authors: masdiblogs (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

70,000+ active /1,317,221 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wordpress-ping-optimizer/cbnet-ping-optimizer.php+113
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.94ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Ping Optimizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.64 ▼1.90
Dashboard /wp-admin3.44 ▲0.1045.02 ▼11.67
Posts /wp-admin/edit.php3.56 ▲0.2048.45 ▼3.52
Add New Post /wp-admin/post-new.php6.02 ▲0.1483.28 ▼18.66
Media Library /wp-admin/upload.php3.37 ▲0.1437.18 ▲3.06
WordPress Ping Optimizer /wp-admin/options-general.php?page=wordpress-ping-optimizer/cbnet-ping-optimizer.php3.3534.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
wp_cbnetpo_ping_optimizer
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
cbnetpo_options

Browser metrics Passed 4 tests

WordPress Ping Optimizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7113.22 ▼1.141.51 ▼0.1837.88 ▼2.10
Dashboard /wp-admin2,217 ▲295.77 ▲0.91106.33 ▼3.7841.44 ▲1.85
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0238.29 ▼1.7533.42 ▼3.81
Add New Post /wp-admin/post-new.php1,517 ▼217.43 ▼5.44647.99 ▼1.9754.05 ▼2.35
Media Library /wp-admin/upload.php1,395 ▲104.28 ▲0.1296.73 ▼3.2240.21 ▼6.94
WordPress Ping Optimizer /wp-admin/options-general.php?page=wordpress-ping-optimizer/cbnet-ping-optimizer.php9142.1826.9541.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_cbnetpo_ping_optimizer
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • cbnetpo_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wordpress-ping-optimizer/include/about.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wordpress-ping-optimizer/include/options-pg.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-ping-optimizer/cbnet-ping-optimizer.php:732

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
  • Tags: There are too many tags (31 tag instead of maximum 10)
You can take inspiration from this readme.txt

wordpress-ping-optimizer/cbnet-ping-optimizer.php 92% from 13 tests

The entry point to "WordPress Ping Optimizer" version 2.35.1.3.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wordpress-ping-optimizer.php" instead of "cbnet-ping-optimizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected677 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP355164591
JavaScript14070
CSS10016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity133.00
▷ Minimum class complexity133.00
▷ Maximum class complexity133.00
Average method complexity7.60
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png7.73KB5.62KB▼ 27.30%