10% post-type-slider-widget

Code Review | Post Type Slider Widget

WordPress plugin Post Type Slider Widget scored10%from 54 tests.

About plugin

  • Plugin page: post-type-slider-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.5
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: May 31, 2017
  • Number of updates: 4
  • Update frequency: every 21.8 days
  • Top authors: kaumudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/post-type-slider-widget/post-type-slider-widget.php+147
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.00ms] Passed 4 tests

Analyzing server-side resources used by Post Type Slider Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.396.55 ▼33.76
Dashboard /wp-admin2.09 ▼1.216.49 ▼46.96
Posts /wp-admin/edit.php2.09 ▼1.266.19 ▼42.42
Add New Post /wp-admin/post-new.php2.09 ▼3.795.69 ▼88.87
Media Library /wp-admin/upload.php2.09 ▼1.146.02 ▼27.30

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_post_type_slider_widget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Post Type Slider Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.37 ▲0.053.97 ▲2.3642.46 ▼2.03
Dashboard /wp-admin2,195 ▲215.61 ▲0.0586.75 ▼2.7042.65 ▼1.57
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0338.67 ▲1.7536.05 ▲3.08
Add New Post /wp-admin/post-new.php1,531 ▲223.08 ▲0.00650.09 ▲12.1950.11 ▲1.59
Media Library /wp-admin/upload.php1,400 ▼04.11 ▼0.0998.59 ▼8.8542.90 ▼3.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/post-type-slider-widget/post-type-slider-widget.php+147
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_post_type_slider_widget
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: You can look at the official readme.txt

post-type-slider-widget/post-type-slider-widget.php 92% from 13 tests

"Post Type Slider Widget" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin139 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP11526106
CSS311031
JavaScript1052

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/right.png2.63KB1.58KB▼ 40.03%
assets/img/left.png2.59KB1.53KB▼ 40.88%
assets/img/placeholder.png6.23KB3.49KB▼ 43.98%