74% custom-post-slider

Code Review | Custom Post Slider

WordPress plugin Custom Post Slider scored 74% from 54 tests.

About plugin

  • Plugin page: custom-post-slider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: tuyennv (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,048 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.96ms] Passed 4 tests

An overview of server-side resources used by Custom Post Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.06 ▼2.49
Dashboard /wp-admin3.33 ▲0.0246.18 ▲0.28
Posts /wp-admin/edit.php3.38 ▲0.0246.69 ▲4.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.68 ▲1.99
Media Library /wp-admin/upload.php3.25 ▲0.0241.75 ▲5.78

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: 2 new tables, 12 new options
New tables
wp_tzcustom_optionset
wp_tzcustom_thumbnail
New WordPress options
tzcustomsmethod3
widget_recent-posts
widget_theysaidso_widget
tzcustomsmethod2
can_compress_scripts
widget_recent-comments
tzcustomsmethod1
tzcustom-curr-version
theysaidso_admin_options
tzcustom-db-version
...

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Post Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲11713.60 ▲0.348.40 ▲2.4239.79 ▼2.58
Dashboard /wp-admin2,218 ▲95.84 ▲0.99102.22 ▲2.1773.00 ▲32.11
Posts /wp-admin/edit.php2,104 ▲181.97 ▼0.0234.58 ▼0.6933.65 ▲3.11
Add New Post /wp-admin/post-new.php1,680 ▲14419.96 ▼3.17810.48 ▲164.5164.18 ▲10.25
Media Library /wp-admin/upload.php1,406 ▲184.16 ▼0.0893.64 ▼4.3571.04 ▲29.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_tzcustom_optionset
    • wp_tzcustom_thumbnail
  • This plugin does not fully uninstall, leaving 12 options in the database
    • tzcustom-db-version
    • tzcustom-update-notification
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • tzcustomsmethod2
    • widget_theysaidso_widget
    • widget_recent-posts
    • tzcustom-curr-version
    • ...

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/custom-post-slider/custom-post-slider.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Add New.), #2 (Post options.), #3 (Use Shortcode.)
You can look at the official readme.txt

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

This is the main PHP file of "Custom Post Slider" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Multiple slider with Featured Image post and easy options to config.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,357 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4236231,550
PHP6145881,299
CSS52229508

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/down.png2.77KB0.11KB▼ 95.95%
images/downb.png0.15KB0.11KB▼ 24.84%
images/tzsidebar.png0.28KB0.31KB0.00%
images/up.png2.79KB0.11KB▼ 95.94%
images/upb.png0.96KB0.11KB▼ 88.15%