78% wp-gzip

Code Review | WP GZip

WordPress plugin WP GZip scored78%from 54 tests.

About plugin

  • Plugin page: wp-gzip
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2016
  • Latest release: Mar 9, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: milanezlucas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.06ms] Passed 4 tests

An overview of server-side resources used by WP GZip
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.58 ▲1.22
Dashboard /wp-admin3.31 ▲0.0153.61 ▲1.88
Posts /wp-admin/edit.php3.36 ▲0.0045.30 ▼4.87
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.53 ▼6.47
Media Library /wp-admin/upload.php3.23 ▲0.0035.59 ▲4.60

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP GZip
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.32 ▼0.911.76 ▼0.4544.45 ▼1.85
Dashboard /wp-admin2,207 ▲195.85 ▲0.9798.96 ▼2.9341.45 ▼2.15
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0235.70 ▼5.0636.25 ▼4.78
Add New Post /wp-admin/post-new.php1,544 ▲3023.25 ▲5.73603.50 ▼13.7150.27 ▼4.88
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0199.46 ▲5.0946.58 ▲4.49
WordPress GZip /wp-admin/wp-gzip-admin.php260.440.1013.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-gzip/wp-gzip.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/wp-gzip-admin.php
    • > Network (severe)
    wp-admin/wp-gzip-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

wp-gzip/wp-gzip.php Passed 13 tests

Analyzing the main PHP file in "WP GZip" version 1.0
21 characters long description:
Simple WordPress GZip

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected210 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32917210

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.00
▷ Minimum class complexity7.00
▷ Maximum class complexity13.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods218.18%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin