83% slider-comparison-image-before-and-after

Code Review | Slider comparison image before and after

WordPress plugin Slider comparison image before and after scored83%from 54 tests.

About plugin

  • Plugin page: slider-comparison...
  • Plugin version: 0.8.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Aug 3, 2015
  • Latest release: Apr 21, 2016
  • Number of updates: 7
  • Update frequency: every 37.3 days
  • Top authors: hardwaremaster (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /16,501 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.18ms] Passed 4 tests

An overview of server-side resources used by Slider comparison image before and after
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.44 ▼1.67
Dashboard /wp-admin3.33 ▼0.0148.81 ▼18.53
Posts /wp-admin/edit.php3.39 ▲0.0350.72 ▼1.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.75 ▼17.76
Media Library /wp-admin/upload.php3.26 ▲0.0336.04 ▼2.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Slider comparison image before and after: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.08 ▼0.271.88 ▲0.2240.60 ▲1.92
Dashboard /wp-admin2,194 ▲175.62 ▲0.0384.12 ▼14.1739.10 ▼4.45
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0341.68 ▼1.3335.73 ▼5.11
Add New Post /wp-admin/post-new.php1,535 ▼123.12 ▲0.21681.31 ▲13.4047.93 ▼0.50
Media Library /wp-admin/upload.php1,402 ▼14.21 ▲0.05105.41 ▲5.0444.51 ▼1.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/slider-comparison-image-before-and-after/sciba.php:15

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (An example of the plugin.), #2 (Menu visual editor.), #3 (The window insert shortcode.)
You can take inspiration from this readme.txt

slider-comparison-image-before-and-after/sciba.php 85% from 13 tests

The principal PHP file in "Slider comparison image before and after" v. 0.8.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("slider-comparison-image-before-and-after.php" instead of "sciba.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 plugin245 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1100106
PHP1281199
PO File1111240

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.89MB with 0.48MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png888.54KB288.44KB▼ 67.54%
screenshot-3.png20.47KB8.11KB▼ 60.39%
images/sciba-icon.png1.39KB0.80KB▼ 42.36%
screenshot-2.png4.47KB2.48KB▼ 44.58%