84% wao-io-cache-control

Code Review | wao.io Cache Control

WordPress plugin wao.io Cache Control scored84%from 54 tests.

About plugin

  • Plugin page: wao-io-cache-control
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Aug 9, 2020
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: waoio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,026 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.08ms] Passed 4 tests

Analyzing server-side resources used by wao.io Cache Control
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.31 ▼6.86
Dashboard /wp-admin3.37 ▲0.0647.18 ▼7.17
Posts /wp-admin/edit.php3.48 ▲0.1245.03 ▼4.72
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.90 ▼1.58
Media Library /wp-admin/upload.php3.29 ▲0.0637.98 ▲5.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for wao.io Cache Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12714.36 ▼0.211.75 ▼0.0941.76 ▼3.58
Dashboard /wp-admin2,298 ▲1245.65 ▲0.0890.22 ▼14.9539.61 ▼6.17
Posts /wp-admin/edit.php2,199 ▲991.99 ▲0.0239.29 ▼1.1833.44 ▼8.92
Add New Post /wp-admin/post-new.php1,539 ▲1123.10 ▼0.10676.50 ▼21.4063.78 ▲10.32
Media Library /wp-admin/upload.php1,502 ▲1054.22 ▼0.00105.99 ▲6.5846.79 ▲1.41

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wao-io-cache-control/includes/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wao-io-cache-control/wao-io-cache-control.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wao-io-cache-control/includes/header.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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: clear, caching, velocity, performance, cache...

wao-io-cache-control/wao-io-cache-control.php Passed 13 tests

This is the main PHP file of "wao.io Cache Control" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
57 characters long description:
Automatically clear wao.io optimizer cache from WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin497 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP34739325
SVG10096
PO File2363876

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin