90% optimwp

Code Review | OptimWP

WordPress plugin OptimWP scored90%from 54 tests.

About plugin

  • Plugin page: optimwp
  • Plugin version: 1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 31, 2023
  • Latest release: Sep 18, 2023
  • Number of updates: 6
  • Update frequency: every 38.3 days
  • Top authors: ufukart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /232 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.55ms] Passed 4 tests

Server-side resources used by OptimWP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.13 ▼9.50
Dashboard /wp-admin3.44 ▲0.1348.43 ▼0.47
Posts /wp-admin/edit.php3.55 ▲0.1953.10 ▲4.84
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.21 ▼5.77
Media Library /wp-admin/upload.php3.36 ▲0.1337.34 ▲1.56
OptimWP /wp-admin/options-general.php?page=optimwp3.3232.80

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
optimwp_options

Browser metrics Passed 4 tests

Checking browser requirements for OptimWP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.48 ▲0.121.82 ▲0.1941.32 ▼4.46
Dashboard /wp-admin2,196 ▲45.80 ▲0.84105.09 ▼13.9140.20 ▲0.44
Posts /wp-admin/edit.php2,085 ▼42.05 ▲0.0040.08 ▲0.2435.31 ▲0.15
Add New Post /wp-admin/post-new.php1,532 ▲1323.24 ▼0.05666.21 ▲71.2952.90 ▼9.69
Media Library /wp-admin/upload.php1,384 ▼44.21 ▼0.0598.34 ▲1.1843.63 ▼0.24
OptimWP /wp-admin/options-general.php?page=optimwp1,4192.0223.3627.42

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 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 Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

optimwp/optimwp.php Passed 13 tests

The main file in "OptimWP" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
46 characters long description:
WordPress Tweak Tool. Optimize Your WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin668 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15561668

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions22
▷ Named functions1986.36%
▷ Anonymous functions313.64%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/optimwp.png13.57KB7.54KB▼ 44.44%