84% surbma-before-after

Code Review | CPS | Before / After Images

WordPress plugin CPS | Before / After Images scored 84% from 54 tests.

About plugin

  • Plugin page: surbma-before-after
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Jan 1, 2018
  • Latest release: Apr 8, 2023
  • Number of updates: 18
  • Update frequency: every 106.9 days
  • Top authors: Surbma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,163 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by CPS | Before / After Images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0240.20 ▼2.80
Dashboard /wp-admin3.31 ▲0.0143.96 ▼2.12
Posts /wp-admin/edit.php3.37 ▲0.0147.03 ▼1.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0178.75 ▼19.55
Media Library /wp-admin/upload.php3.24 ▲0.0135.95 ▲1.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CPS | Before / After Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲15314.02 ▼0.285.64 ▲3.8239.85 ▼7.70
Dashboard /wp-admin2,200 ▲124.89 ▼0.03109.52 ▼1.9447.93 ▲5.64
Posts /wp-admin/edit.php2,086 ▼32.05 ▼0.0738.96 ▼7.8534.15 ▼1.35
Add New Post /wp-admin/post-new.php1,539 ▲2023.13 ▼0.01644.34 ▼30.5357.47 ▲6.21
Media Library /wp-admin/upload.php1,382 ▼34.18 ▲0.0199.71 ▲5.7246.59 ▲3.75

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/surbma-before-after/surbma-before-after.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
7 plugin tags: after, image, before after, surbma, before...

surbma-before-after/surbma-before-after.php 92% from 13 tests

The entry point to "CPS | Before / After Images" version 2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected721 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript214480512
CSS1290176
PHP1111330
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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