74% cvmh-simple-slideshow

Code Review | Simple Slideshow

WordPress plugin Simple Slideshow scored74%from 54 tests.

About plugin

  • Plugin page: cvmh-simple-slide...
  • Plugin version: 1.2.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Jan 26, 2022
  • Number of updates: 36
  • Update frequency: every 62.6 days
  • Top authors: cvmh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /5,857 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.19MB] [CPU: ▼39.66ms] Passed 4 tests

A check of server-side resources used by Simple Slideshow
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6716.17 ▼27.30
Dashboard /wp-admin2.83 ▼0.4820.54 ▼27.92
Posts /wp-admin/edit.php2.83 ▼0.5316.36 ▼30.74
Add New Post /wp-admin/post-new.php2.83 ▼3.0615.61 ▼72.68
Media Library /wp-admin/upload.php2.83 ▼0.4016.04 ▼17.46
Add new /wp-admin/post-new.php?post_type=cvmh_slideshow2.8316.90
Simple Slideshow /wp-admin/options-general.php?page=cvmh-simple-slideshow2.8316.56
All slides /wp-admin/edit.php?post_type=cvmh_slideshow2.8316.64

Server storage [IO: ▲0.08MB] [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: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_cvmh_slideshow_widget
cvmh_slideshow
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Slideshow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲24314.76 ▲0.381.63 ▼0.7137.97 ▼4.24
Dashboard /wp-admin2,381 ▲1936.45 ▲0.60131.07 ▲28.5438.71 ▼1.77
Posts /wp-admin/edit.php2,290 ▲2013.42 ▲1.4055.15 ▲12.3635.25 ▼2.14
Add New Post /wp-admin/post-new.php1,550 ▲1623.48 ▲0.05577.13 ▼57.8132.32 ▼22.59
Media Library /wp-admin/upload.php1,429 ▲384.11 ▼0.3181.26 ▼15.0940.06 ▼2.91
Add new /wp-admin/post-new.php?post_type=cvmh_slideshow1,6973.5061.1041.02
Simple Slideshow /wp-admin/options-general.php?page=cvmh-simple-slideshow1,1863.1637.2632.15
All slides /wp-admin/edit.php?post_type=cvmh_slideshow1,2463.5846.2426.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/cvmh-simple-slideshow.php+95
    Undefined index: categories
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_cvmh_slideshow_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=cvmh_slideshow
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/cvmh-simple-slideshow.php+95
    Undefined index: categories
    • > GET request to /wp-admin/post-new.php?post_type=cvmh_slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/includes/functions/admin.php+152
    Undefined index: cvmh_slide_nonce
    • > GET request to /wp-admin/post-new.php?post_type=cvmh_slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/views/metabox-slide.php+30
    Undefined offset: 0
    • > GET request to /wp-admin/options-general.php?page=cvmh-simple-slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/views/settings.php+9
    Undefined index: action
    • > GET request to /wp-admin/options-general.php?page=cvmh-simple-slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/views/settings.php+74
    Undefined index: show_dots
    • > GET request to /wp-admin/options-general.php?page=cvmh-simple-slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/views/settings.php+118
    Undefined index: background
    • > GET request to /wp-admin/edit.php?post_type=cvmh_slideshow
    • > Notice in wp-content/plugins/cvmh-simple-slideshow/includes/3rd-party/wordpress-seo.php+20
    Trying to get property 'post_type' of non-object

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: slideshow, jquery

cvmh-simple-slideshow/cvmh-simple-slideshow.php Passed 13 tests

This is the main PHP file of "Simple Slideshow" version 1.2.15, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
24 characters long description:
A very simple slideshow.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,112 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP996117712
PO File175165169
JavaScript43819157
CSS40074

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/sprite.png2.41KB1.39KB▼ 42.16%