73% slide-img

Code Review | Slide IMG

WordPress plugin Slide IMG scored73%from 54 tests.

About plugin

  • Plugin page: slide-img
  • Plugin version: 1.1
  • PHP compatiblity: 5.6.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 2, 2021
  • Latest release: Jan 2, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: nhomcaodem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /344 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

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

Server-side resources used by Slide IMG
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.83 ▼4.46
Dashboard /wp-admin3.31 ▲0.0144.97 ▼3.09
Posts /wp-admin/edit.php3.36 ▲0.0150.44 ▲3.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.91 ▲0.29
Media Library /wp-admin/upload.php3.23 ▲0.0134.44 ▼0.70
Slide IMG /wp-admin/options-general.php?page=slideimg-options3.1827.92

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Slide IMG
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.56 ▼0.828.53 ▲6.4937.93 ▼7.79
Dashboard /wp-admin2,207 ▲194.85 ▼0.03109.88 ▼7.1242.96 ▼3.91
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0139.58 ▲1.7634.02 ▼1.01
Add New Post /wp-admin/post-new.php1,545 ▲1218.58 ▼4.44601.95 ▼51.2853.42 ▼8.49
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0199.07 ▼6.4243.16 ▲0.49
Slide IMG /wp-admin/options-general.php?page=slideimg-options1,2242.0324.5444.15

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 47 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slideimg-options
    • > Notice in wp-content/plugins/slide-img/inc/slideimg-admin-page.php+126
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slide-img/inc/slideimg-admin-page.php:150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slide-img/inc/slideimg-content.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slide-img/slide-img.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=slideimg-options
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=slideimg-options 205 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

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
4 plugin tags: ihoan, caodem, slideshow, slide img

slide-img/slide-img.php Passed 13 tests

This is the main PHP file of "Slide IMG" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
Create photo slideshows for the website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected488 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31721197
PO File256120129
CSS1132112
JavaScript17450

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin