84% cs3lider

Code Review | CS^3lider

WordPress plugin CS^3lider scored84%from 54 tests.

About plugin

  • Plugin page: cs3lider
  • Plugin version: 0.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2019
  • Latest release: Dec 20, 2019
  • Number of updates: 2
  • Update frequency: every 6.5 days
  • Top authors: moxgummy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.67ms] Passed 4 tests

A check of server-side resources used by CS^3lider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.06 ▼7.24
Dashboard /wp-admin3.33 ▲0.0341.73 ▼5.65
Posts /wp-admin/edit.php3.44 ▲0.0948.99 ▲10.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0580.83 ▼12.87
Media Library /wp-admin/upload.php3.25 ▲0.0333.76 ▼0.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
widget_cs3lider
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

CS^3lider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.32 ▼1.242.24 ▲0.2943.26 ▲4.38
Dashboard /wp-admin2,230 ▲454.92 ▲0.05123.98 ▲5.4242.57 ▼10.10
Posts /wp-admin/edit.php2,113 ▲242.05 ▲0.0747.31 ▲8.1334.13 ▼5.89
Add New Post /wp-admin/post-new.php1,551 ▲1823.37 ▲1.97698.67 ▲4.8155.57 ▲0.50
Media Library /wp-admin/upload.php1,412 ▲244.23 ▲0.07113.44 ▼9.8651.54 ▼2.56

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_cs3lider
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cs3lider\\add_action() in wp-content/plugins/cs3lider/cs3lider-admin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cs3lider/cs3lider.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: css, slider

cs3lider/cs3lider.php Passed 13 tests

The primary PHP file in "CS^3lider" version 0.0.1 is used by WordPress to initiate all plugin functionality
96 characters long description:
CS^3lider is a WordPress plugin to create very lightweight sliders written in only CSS and HTML.

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
No dangerous file extensions were detected356 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP47334258
JavaScript14162
CSS15036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions97
▷ Named functions3738.14%
▷ Anonymous functions6061.86%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected