90% toms-image-slider

Code Review | TomS Image Slider

WordPress plugin TomS Image Slider scored90%from 54 tests.

About plugin

  • Plugin page: toms-image-slider
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2021
  • Latest release: Mar 17, 2023
  • Number of updates: 11
  • Update frequency: every 47.8 days
  • Top authors: tomsneddon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,659 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 gracefully, with no errors

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

An overview of server-side resources used by TomS Image Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.75 ▼8.42
Dashboard /wp-admin3.33 ▼0.0251.03 ▼13.51
Posts /wp-admin/edit.php3.38 ▲0.0250.56 ▼1.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.10 ▼16.78
Media Library /wp-admin/upload.php3.25 ▲0.0236.85 ▲1.47

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TomS Image Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.80 ▲0.401.70 ▼0.0344.95 ▼4.73
Dashboard /wp-admin2,221 ▲214.86 ▼1.02113.96 ▼2.4243.34 ▼0.42
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0133.85 ▼4.4636.93 ▲2.59
Add New Post /wp-admin/post-new.php6,367 ▲4,82727.88 ▲4.71921.51 ▲226.8960.12 ▼3.27
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.02110.04 ▼6.9247.15 ▼1.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: gallery block, image from url block, image block, block, slider from url...

toms-image-slider/toms-image-slider.php 92% from 13 tests

"TomS Image Slider" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.4" instead of "7.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,704 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript284127892
CSS2839549
JSON300130
PHP3171469
PO File1232464

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo24.png0.77KB0.88KB0.00%
img/default.png13.34KB5.68KB▼ 57.42%