78% cache-seo-speed

Code Review | Cache SEO Speed

WordPress plugin Cache SEO Speed scored78%from 54 tests.

About plugin

  • Plugin page: cache-seo-speed
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9
  • WordPress version: 6.3.1
  • First release: Aug 29, 2018
  • Latest release: Sep 29, 2018
  • Number of updates: 11
  • Update frequency: every 3.0 days
  • Top authors: wallrio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /841 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.02ms] Passed 4 tests

Analyzing server-side resources used by Cache SEO Speed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2141.89 ▲0.34
Dashboard /wp-admin3.38 ▲0.0863.72 ▲12.26
Posts /wp-admin/edit.php3.49 ▲0.1450.35 ▲2.49
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.31 ▼18.19
Media Library /wp-admin/upload.php3.30 ▲0.0739.96 ▲3.28
Cache SEO Speed /wp-admin/admin.php?page=cache-seo-speed3.5537.90
About /wp-admin/admin.php?page=CssWallRioMain_about3.4236.00

Server storage [IO: ▲0.41MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • The plugin illegally modified 3 files (19.69KB) outside of "wp-content/plugins/cache-seo-speed/" and "wp-content/uploads/"
    • (modified) index.php
    • (modified) wp-content/themes/twentytwentyone/functions.php
    • (new file) wp-content/cache/cache-seo-speed/.css-config.dat
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
cacha-seo-speed-start
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Cache SEO Speed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.35 ▼0.001.67 ▼0.0346.44 ▲1.06
Dashboard /wp-admin2,211 ▲345.61 ▲0.0896.22 ▲3.0870.32 ▲26.81
Posts /wp-admin/edit.php2,131 ▲311.98 ▼0.0435.32 ▼4.3533.48 ▼4.98
Add New Post /wp-admin/post-new.php1,703 ▲17722.19 ▼0.87762.07 ▲70.5756.01 ▲0.51
Media Library /wp-admin/upload.php1,431 ▲344.21 ▲0.0796.76 ▼23.3959.26 ▲10.48
Cache SEO Speed /wp-admin/admin.php?page=cache-seo-speed1,3542.0024.7849.59
About /wp-admin/admin.php?page=CssWallRioMain_about8582.1626.3133.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cache-seo-speed/views/about/index.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/cache-seo-speed/CssWallRioMain.php:31
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cache-seo-speed/views/about/index.php on line 8
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/cache-seo-speed/src/CssWallRio_init.php on line 64
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cache-seo-speed/views/settings/index.php on line 9
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/cache-seo-speed/src/CssWallRio_init.php on line 64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cache-seo-speed/views/about/index.php:13
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cache-seo-speed/views/settings/index.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/cache-seo-speed/views/settings/index.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Zip' not found in wp-content/plugins/cache-seo-speed/src/zip/test/test.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=cache-seo-speed
    • > Network (severe)
    https://wallrio.com/wordpress/plugins/cache-seo-speed/pagseguro/donate-button.jpg - Failed to load resource: the server responded with a status of 404 ()

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
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

cache-seo-speed/CssWallRioMain.php 92% from 13 tests

The main file in "Cache SEO Speed" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cache-seo-speed.php" instead of "CssWallRioMain.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,353 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,6782,2455,229
Markdown1250108
CSS2009
JSON1007

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity71.00
▷ Minimum class complexity3.00
▷ Maximum class complexity553.00
Average method complexity7.77
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods124
▷ Static methods4032.26%
▷ Public methods12096.77%
▷ Protected methods00.00%
▷ Private methods43.23%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants68
▷ Global constants68100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-default.png27.28KB13.68KB▼ 49.85%
icon.png0.65KB0.72KB0.00%