84% whook-content-slider

Code Review | Whook content slider

WordPress plugin Whook content slider scored84%from 54 tests.

About plugin

  • Plugin page: whook-content-slider
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 30, 2018
  • Latest release: Apr 17, 2018
  • Number of updates: 27
  • Update frequency: every 1.0 days
  • Top authors: darteweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Whook content slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.77 ▼8.02
Dashboard /wp-admin3.33 ▲0.0354.46 ▼0.19
Posts /wp-admin/edit.php3.38 ▲0.0250.75 ▲0.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.41 ▼7.83
Media Library /wp-admin/upload.php3.26 ▲0.0237.40 ▲1.19

Server storage [IO: ▲0.06MB] [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
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Whook content slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.38 ▲0.035.25 ▲3.4242.09 ▼3.60
Dashboard /wp-admin2,198 ▲245.62 ▼0.0794.93 ▼6.5640.70 ▼4.67
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0339.38 ▲1.2036.03 ▼0.51
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▼0.57673.64 ▲9.1355.74 ▲2.79
Media Library /wp-admin/upload.php1,403 ▲94.22 ▲0.0598.93 ▲2.1848.70 ▲4.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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 fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_image_size() in wp-content/plugins/whook-content-slider/whook_content_slider.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: post slider, content slider, page slider, category post slider, carousel...

whook-content-slider/whook_content_slider.php 92% from 13 tests

The entry point to "Whook content slider" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("whook-content-slider.php" instead of "whook_content_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin384 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS295179
PHP1248136
JavaScript214969
HTML1100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity16.00
▷ Minimum method complexity16.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right.png1.10KB0.27KB▼ 75.84%
images/left.png1.11KB0.26KB▼ 76.25%