83% wp-compress-mainwp

Code Review | WP Compress for MainWP

WordPress plugin WP Compress for MainWP scored83%from 54 tests.

About plugin

  • Plugin page: wp-compress-mainwp
  • Plugin version: 6.10.07
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Apr 13, 2023
  • Number of updates: 11
  • Update frequency: every 136.7 days
  • Top authors: smartersite (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /3,963 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.55ms] Passed 4 tests

Server-side resources used by WP Compress for MainWP
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.51 ▲3.15
Dashboard /wp-admin3.32 ▼0.0246.68 ▼15.54
Posts /wp-admin/edit.php3.37 ▲0.0242.32 ▼4.50
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.08 ▼24.33
Media Library /wp-admin/upload.php3.25 ▲0.0236.25 ▲2.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Compress for MainWP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.71 ▼0.651.83 ▲0.0242.99 ▼0.76
Dashboard /wp-admin2,251 ▲695.01 ▲0.10120.63 ▲15.1641.81 ▼3.00
Posts /wp-admin/edit.php2,129 ▲372.58 ▲0.5234.98 ▼11.7732.64 ▼4.25
Add New Post /wp-admin/post-new.php1,557 ▲2923.41 ▲5.16668.66 ▲64.8574.43 ▲9.45
Media Library /wp-admin/upload.php1,434 ▲494.28 ▲0.07106.88 ▲7.5245.99 ▲1.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-compress-mainwp/wp-compress-main-wp.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 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
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Contributors: The plugin contributors field is missing
  • Contributors: Please add at least on tag
The official readme.txt might help

wp-compress-mainwp/wp-compress-main-wp.php 92% from 13 tests

"WP Compress for MainWP" version 6.10.07's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-compress-mainwp.php" instead of "wp-compress-main-wp.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
Success! There were no dangerous files found in this plugin5,993 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,0784424,225
CSS34501,111
PHP317049467
LESS1520190

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity15.33
▷ Minimum class complexity8.00
▷ Maximum class complexity22.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin