78% waj-image-slider

Code Review | WAJ Image Slider

WordPress plugin WAJ Image Slider scored78%from 54 tests.

About plugin

  • Plugin page: waj-image-slider
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2019
  • Latest release: May 8, 2019
  • Number of updates: 5
  • Update frequency: every 23.8 days
  • Top authors: waughjai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,059 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.15ms] Passed 4 tests

An overview of server-side resources used by WAJ Image Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0944.57 ▲3.10
Dashboard /wp-admin3.40 ▲0.0547.25 ▼18.90
Posts /wp-admin/edit.php3.51 ▲0.1648.79 ▼0.64
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.30 ▼4.15
Media Library /wp-admin/upload.php3.32 ▲0.0942.57 ▲6.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WAJ Image Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.37 ▲0.021.69 ▼0.4438.82 ▼10.66
Dashboard /wp-admin2,198 ▲315.61 ▲0.0381.54 ▼21.2338.76 ▲0.63
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0539.98 ▲4.9136.46 ▲1.68
Add New Post /wp-admin/post-new.php1,526 ▼023.36 ▲0.27714.67 ▲9.7758.73 ▲1.54
Media Library /wp-admin/upload.php1,397 ▼04.17 ▼0.03104.76 ▼12.5944.79 ▼1.35

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/waj-image-slider/vendor/waughj/html-image-slider/demo.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/verified-arguments/tests/VerifiedArgumentsTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\VerifiedArguments\\VerifiedArguments' not found in wp-content/plugins/waj-image-slider/vendor/waughj/verified-arguments-same-type/src/VerifiedArgumentsSameType.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/html-attribute-list/tests/HTMLAttributeListTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/file/tests/FileTest.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/waj-image-slider/vendor/waughj/html-image-slider/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/waj-image-slider/vendor/waughj/html-image-slider/demo.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/file-loader/tests/FileLoaderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\HTMLImage\\HTMLImage' not found in wp-content/plugins/waj-image-slider/vendor/waughj/html-image-responsive/src/HTMLImageResponsive.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/wp-upload-picture/tests/WPUploadPictureTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/waj-image-slider/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-image-slider/vendor/waughj/directory/tests/DirectoryTest.php:6

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: html generator, loader, image

waj-image-slider/waj-image-slider.php Passed 13 tests

"WAJ Image Slider" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
65 characters long description:
Plugin that creates shortcode for easy creation o' image sliders.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected7,787 lines of code in 111 files:
LanguageFilesBlank linesComment linesLines of code
JSON21003,770
PHP586031,3143,265
Markdown242290488
JavaScript3214228
CSS21019
XML10012
YAML2205

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.17
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces7
Traits1
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods336
▷ Static methods288.33%
▷ Public methods31092.26%
▷ Protected methods10.30%
▷ Private methods257.44%
Functions53
▷ Named functions3667.92%
▷ Anonymous functions1732.08%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) vendor/waughj/html-image-slider/demo-img/water-2000x1333.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/html-image-slider/demo-img/water-1000x667.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/html-image-slider/demo-img/clear-1000x667.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/html-image-slider/demo-img/clear-500x334.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/wp-upload-picture/2018/12/demo.png0.00KB0.00KB0.00%