90% redpic-js-css-optimizer

Code Review | Redpic JS&CSS Optimizer

WordPress plugin Redpic JS&CSS Optimizer scored 90% from 54 tests.

About plugin

  • Plugin page: redpic-js-css-opt...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2020
  • Latest release: Feb 7, 2020
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: alekseyf (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active / 1,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Redpic JS&CSS Optimizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7663.32 ▲18.85
Dashboard /wp-admin3.40 ▲0.0949.36 ▲0.29
Posts /wp-admin/edit.php3.52 ▲0.1647.30 ▼2.01
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.31 ▼11.89
Media Library /wp-admin/upload.php3.32 ▲0.0937.09 ▲3.31
Redpic JS&CSS Optimizer /wp-admin/options-general.php?page=redpic-js-css-optimizer3.2931.41

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
redpic-js-css-optimizer
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Redpic JS&CSS Optimizer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.70 ▼0.712.15 ▲0.1141.42 ▼2.48
Dashboard /wp-admin2,210 ▲224.81 ▼0.05111.90 ▼3.7942.90 ▼1.20
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0137.09 ▼3.8632.22 ▼8.62
Add New Post /wp-admin/post-new.php1,550 ▲1718.32 ▼4.84610.96 ▼14.6966.00 ▲16.30
Media Library /wp-admin/upload.php1,389 ▲14.22 ▲0.0398.44 ▼5.1045.67 ▼2.17
Redpic JS&CSS Optimizer /wp-admin/options-general.php?page=redpic-js-css-optimizer8052.0326.0528.43

Uninstaller [IO: ▲0.34MB] [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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • redpic-js-css-optimizer

Smoke tests Passed 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 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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: optimizing, google pagespeed, optimize, caching, performance...

redpic-js-css-optimizer/redpic-js-css-optimizer.php Passed 13 tests

This is the main PHP file of "Redpic JS&CSS Optimizer" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
16 characters long description:
js-css optimizer

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin415 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP443130415

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.50
▷ Minimum class complexity9.00
▷ Maximum class complexity62.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods526.32%
▷ Public methods1052.63%
▷ Protected methods00.00%
▷ Private methods947.37%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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 files were detected