84% th-partner-slider

Code Review | TH Partner Slider

WordPress plugin TH Partner Slider scored84%from 54 tests.

About plugin

  • Plugin page: th-partner-slider
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Feb 6, 2021
  • Latest release: May 22, 2021
  • Number of updates: 8
  • Update frequency: every 13.2 days
  • Top authors: triopsi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,233 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.21ms] Passed 4 tests

This is a short check of server-side resources used by TH Partner Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.81 ▼0.94
Dashboard /wp-admin3.34 ▲0.0443.29 ▼16.31
Posts /wp-admin/edit.php3.39 ▲0.0446.68 ▼3.45
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.32 ▼11.98
Media Library /wp-admin/upload.php3.26 ▲0.0434.99 ▼1.08
All Partners /wp-admin/edit.php?post_type=thpp3.3437.92
Help /wp-admin/edit.php?post_type=thpp&page=thpp_help3.2332.02
TH Partner Options /wp-admin/options-general.php?page=thpp3.2432.08
Add New Partner /wp-admin/post-new.php?post_type=thpp3.4048.88

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
thpp_plugin_version
db_upgraded
can_compress_scripts
widget_thppsliderwidget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TH Partner Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.61 ▼0.782.70 ▲0.9646.47 ▲0.50
Dashboard /wp-admin2,235 ▲505.83 ▲0.97103.84 ▼0.4041.02 ▼0.70
Posts /wp-admin/edit.php2,124 ▲352.06 ▼0.0740.44 ▲2.6335.21 ▼0.81
Add New Post /wp-admin/post-new.php1,562 ▲4323.31 ▲0.08668.48 ▲74.0158.11 ▼10.36
Media Library /wp-admin/upload.php1,423 ▲384.19 ▲0.0295.67 ▼6.0942.57 ▼2.78
All Partners /wp-admin/edit.php?post_type=thpp1,2333.3343.8027.48
Help /wp-admin/edit.php?post_type=thpp&page=thpp_help1,0492.0225.4730.75
TH Partner Options /wp-admin/options-general.php?page=thpp8222.0624.3031.64
Add New Partner /wp-admin/post-new.php?post_type=thpp1,7283.7262.9035.71

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_thppsliderwidget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/th-partner-slider/inc/thpp-shortcode.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/inc/thpp-setting.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/th-partner-slider.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/inc/thpp-user.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/th-partner-slider/inc/thpp-widget.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/inc/thpp-types.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/inc/thpp-admin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/th-partner-slider/inc/thpp-post-metabox.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: shortcode, slideshow, sidebar, post, panel...

th-partner-slider/th-partner-slider.php 92% from 13 tests

"TH Partner Slider" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin1,288 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10133382719
CSS22922368
PO File18588184
JavaScript21317

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot-5.png11.91KB5.27KB▼ 55.76%
assets/img/controls.png2.19KB0.95KB▼ 56.49%