68% files-mash-optimizer

Code Review | Files Mash Optimizer

WordPress plugin Files Mash Optimizer scored68%from 54 tests.

About plugin

  • Plugin page: files-mash-optimizer
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 23, 2019
  • Latest release: Aug 26, 2019
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: serverlin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /458 total downloads

Benchmarks

Plugin footprint 65% 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.41MB] [CPU: ▲1.39ms] Passed 4 tests

Server-side resources used by Files Mash Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4045.97 ▲1.09
Dashboard /wp-admin3.74 ▲0.4350.40 ▲0.74
Posts /wp-admin/edit.php3.79 ▲0.4349.80 ▲2.60
Add New Post /wp-admin/post-new.php6.25 ▲0.3796.20 ▲3.45
Media Library /wp-admin/upload.php3.66 ▲0.4337.28 ▲1.11
FilesMash Optimizer /wp-admin/options-general.php?page=files-mash-optimizer3.6340.23
Bulk FilesMash Optimizer /wp-admin/upload.php?page=filesmash-bulk3.5842.00

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 48 new files
Database: 1 new table, 7 new options
New tables
wp_filesmash_files_metadata
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
filesmash_db_version
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Files Mash Optimizer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲3913.29 ▼1.014.20 ▲2.1643.24 ▼1.96
Dashboard /wp-admin2,210 ▲255.80 ▼0.05103.73 ▼17.1740.07 ▼2.22
Posts /wp-admin/edit.php2,096 ▲42.04 ▲0.0533.22 ▼3.6235.27 ▲1.90
Add New Post /wp-admin/post-new.php1,522 ▲823.02 ▲5.37625.47 ▲27.1656.50 ▲12.77
Media Library /wp-admin/upload.php1,402 ▲174.23 ▲0.0197.80 ▲2.8141.67 ▼0.56
FilesMash Optimizer /wp-admin/options-general.php?page=files-mash-optimizer1,3312.0423.0845.63
Bulk FilesMash Optimizer /wp-admin/upload.php?page=filesmash-bulk8692.0423.0530.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_filesmash_files_metadata
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • filesmash_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/files-mash-optimizer/includes/thirdparties/cloudflare/class-filesmash-cloudflare-hooks.php
    • > /wp-content/plugins/files-mash-optimizer/includes/thirdparties/cloudflare/class-filesmash-cloudflare.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'filesmash_Base' not found in wp-content/plugins/files-mash-optimizer/admin/class-filesmash-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === files-mash-optimizer === )
The official readme.txt might help

files-mash-optimizer/files-mash-optimizer.php Passed 13 tests

The main PHP script in "Files Mash Optimizer" version 1.1 is automatically included on every request by WordPress
47 characters long description:
This plugin can reduce the size of your images.

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
Everything looks great! No dangerous files found in this plugin4,064 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP346187242,329
JavaScript3180281,275
CSS1751460

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity15.95
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes00.00%
Methods141
▷ Static methods3726.24%
▷ Public methods13192.91%
▷ Protected methods10.71%
▷ Private methods96.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants1173.33%
▷ Class constants426.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin