84% horizontal-post-slider

Code Review | Post Slider

WordPress plugin Post Slider scored84%from 54 tests.

About plugin

  • Plugin page: horizontal-post-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 30, 2016
  • Latest release: Oct 20, 2016
  • Number of updates: 43
  • Update frequency: every 6.5 days
  • Top authors: aumsrini (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,500 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
Install script ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▲5.22ms] Passed 4 tests

A check of server-side resources used by Post Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6654.54 ▲13.25
Dashboard /wp-admin3.98 ▲0.6858.21 ▲5.66
Posts /wp-admin/edit.php4.02 ▲0.6753.48 ▲9.24
Add New Post /wp-admin/post-new.php6.55 ▲0.6695.74 ▼4.22
Media Library /wp-admin/upload.php3.87 ▲0.6441.82 ▲10.20

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 107 new files
Database: no new tables, 7 new options
New WordPress options
_cs_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,215 ▲46915.94 ▲1.257.31 ▲5.4343.03 ▼0.85
Dashboard /wp-admin2,503 ▲3157.04 ▲2.13122.63 ▲4.0937.38 ▼10.50
Posts /wp-admin/edit.php2,418 ▲3293.56 ▲1.5358.89 ▲18.2133.29 ▼3.83
Add New Post /wp-admin/post-new.php1,671 ▲15223.68 ▲0.47578.38 ▼41.5633.83 ▼12.31
Media Library /wp-admin/upload.php1,554 ▲1664.89 ▲0.6184.05 ▼18.0942.81 ▼0.15

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
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • _cs_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/horizontal-post-slider/public/partials/horizontal-post-slider-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

horizontal-post-slider/horizontal-post-slider.php Passed 13 tests

The main file in "Post Slider" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin28,802 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JSON20012,928
JavaScript91,2747945,823
CSS7158533,980
PHP541,1091,3432,896
Sass528701,837
SVG100640
PO File6261285601
Markdown118097

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods115
▷ Static methods65.22%
▷ Public methods11196.52%
▷ Protected methods00.00%
▷ Private methods43.48%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cs-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
cs-framework/config/images/horizontal-slider-pro.png25.86KB9.68KB▼ 62.57%
cs-framework/assets/images/chosen-sprite.png0.63KB0.88KB0.00%
cs-framework/assets/images/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%