84% static-optimizer

Code Review | StaticOptimizer

WordPress plugin StaticOptimizer scored 84% from 54 tests.

About plugin

  • Plugin page: static-optimizer
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Nov 26, 2022
  • Number of updates: 30
  • Update frequency: every 25.0 days
  • Top authors: statopt (70%)lordspace (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,845 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼8.49ms] Passed 4 tests

This is a short check of server-side resources used by StaticOptimizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.71 ▲0.33
Dashboard /wp-admin3.45 ▲0.1444.38 ▼7.54
Posts /wp-admin/edit.php3.56 ▲0.2043.32 ▼17.80
Add New Post /wp-admin/post-new.php6.02 ▲0.1485.46 ▼8.93
Media Library /wp-admin/upload.php3.37 ▲0.1437.56 ▲2.99
StaticOptimizer /wp-admin/options-general.php?page=static-optimizer/static-optimizer.php3.3432.87

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

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

Browser metrics Passed 4 tests

A check of browser resources used by StaticOptimizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.28 ▼1.143.94 ▲1.9540.28 ▼6.57
Dashboard /wp-admin2,210 ▲194.87 ▼0.0298.99 ▼11.5939.57 ▼0.88
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0532.70 ▼9.4632.08 ▼3.04
Add New Post /wp-admin/post-new.php1,537 ▲422.98 ▼0.06638.94 ▼20.7356.13 ▲1.62
Media Library /wp-admin/upload.php1,389 ▲14.16 ▼0.0294.79 ▼5.6843.55 ▲0.95
StaticOptimizer /wp-admin/options-general.php?page=static-optimizer/static-optimizer.php1,79010.11255.2965.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'StaticOptimizerMisc' not found in wp-content/plugins/static-optimizer/modules/misc.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StaticOptimizerAdmin' not found in wp-content/plugins/static-optimizer/modules/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StaticOptimizerCore' not found in wp-content/plugins/static-optimizer/modules/core.php:3

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Showing the attachments listing page), #2 (Showing the result)
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
You can look at the official readme.txt

static-optimizer/static-optimizer.php Passed 13 tests

"StaticOptimizer" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
116 characters long description:
Makes your images, js, css load faster by optimizing them and loading them from StaticOptimizer Optimization servers

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 plugin1,442 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP83663541,442

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity39.33
▷ Minimum class complexity2.00
▷ Maximum class complexity109.00
Average method complexity5.18
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods55
▷ Static methods59.09%
▷ Public methods55100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants838.10%
▷ Class constants1361.90%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected