93% post-type-slider

Code Review | Post Type Slider

WordPress plugin Post Type Slider scored 93% from 54 tests.

About plugin

  • Plugin page: post-type-slider
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Sep 24, 2019
  • Latest release: Aug 17, 2020
  • Number of updates: 14
  • Update frequency: every 23.4 days
  • Top authors: primisdigital (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 2,445 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼293.90ms] Passed 4 tests

Analyzing server-side resources used by Post Type Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1154.57 ▲2.63
Dashboard /wp-admin3.52 ▲0.1138.89 ▲5.44
Posts /wp-admin/edit.php3.74 ▲0.1037.98 ▲0.79
Add New Post /wp-admin/post-new.php7.02 ▲0.0397.35 ▼1,178.20
Media Library /wp-admin/upload.php3.39 ▲0.0927.57 ▼0.81
Add Slider /wp-admin/post-new.php?post_type=post_type_slider3.6740.95
All Slider /wp-admin/edit.php?post_type=post_type_slider3.4328.76

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Type Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲5015.74 ▼0.056.33 ▼0.242.19 ▼0.49
Dashboard /wp-admin2,929 ▲716.15 ▲0.01118.31 ▼11.63156.45 ▼6.54
Posts /wp-admin/edit.php2,722 ▲283.24 ▲0.0161.54 ▼2.33135.60 ▼7.94
Add New Post /wp-admin/post-new.php1,785 ▲11722.61 ▲3.33419.29 ▲22.81148.51 ▼18.46
Media Library /wp-admin/upload.php1,737 ▲395.53 ▼0.00139.27 ▼0.76186.90 ▲2.76
Add Slider /wp-admin/post-new.php?post_type=post_type_slider2,4614.0792.60143.52
All Slider /wp-admin/edit.php?post_type=post_type_slider1,3983.1560.27113.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/post-type-slider/post-type-slider.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)
There were no browser issues found

Optimizations

Plugin configuration 86% 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 to be fixed:
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

post-type-slider/post-type-slider.php 77% from 13 tests

"Post Type Slider" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("")
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,781 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2985201,027
PHP24552572
CSS2213182

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/controls.png2.74KB1.42KB▼ 48.29%