83% cp-responsive-slider

Code Review | CP Responsive Slider

WordPress plugin CP Responsive Slider scored83%from 54 tests.

About plugin

  • Plugin page: cp-responsive-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Sep 23, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: coderperson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,773 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.53ms] Passed 4 tests

A check of server-side resources used by CP Responsive Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.45 ▲0.21
Dashboard /wp-admin3.35 ▲0.0546.22 ▼4.09
Posts /wp-admin/edit.php3.40 ▲0.0542.94 ▼8.75
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.55 ▼13.49
Media Library /wp-admin/upload.php3.27 ▲0.0536.20 ▲2.19
CP Sliders /wp-admin/edit.php?post_type=coderperson-items3.3337.22
Add New /wp-admin/post-new.php?post_type=coderperson-items3.4147.02
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=coderperson-items3.2738.08
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=coderperson-items3.2731.85

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
category_children

Browser metrics Passed 4 tests

This is an overview of browser requirements for CP Responsive Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.04 ▼0.5412.26 ▲10.5843.81 ▲4.43
Dashboard /wp-admin2,252 ▲645.95 ▲1.05104.39 ▲2.2541.25 ▼5.42
Posts /wp-admin/edit.php2,132 ▲432.10 ▲0.0735.21 ▼1.1731.49 ▼2.40
Add New Post /wp-admin/post-new.php1,551 ▲1523.47 ▲0.07678.12 ▲2.2359.65 ▼1.27
Media Library /wp-admin/upload.php1,428 ▲434.28 ▲0.0299.49 ▼0.2041.99 ▼4.39
CP Sliders /wp-admin/edit.php?post_type=coderperson-items1,1512.0331.6628.63
Add New /wp-admin/post-new.php?post_type=coderperson-items2,3827.96189.1569.75
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=coderperson-items1,4892.2427.2731.55
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=coderperson-items1,3502.2625.8430.30

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • category_children
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cp-responsive-slider/coderperson-index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Add images for these screenshots: #1 (How to use shortcode in editor.), #2 (Another demo.)
You can take inspiration from this readme.txt

cp-responsive-slider/coderperson-index.php 85% from 13 tests

This is the main PHP file of "CP Responsive Slider" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 369 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cp-responsive-slider.php" instead of "coderperson-index.php")

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 detected5,003 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,3057464,774
PHP14734161
CSS141668

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions5
▷ Named functions5100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/a02.png5.63KB3.45KB▼ 38.77%
js/browser-icons.png11.15KB3.93KB▼ 64.73%