83% ultimate-product-tab

Code Review | Ultimate Product Tab

WordPress plugin Ultimate Product Tab scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-product-tab
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 27, 2015
  • Latest release: Nov 27, 2015
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: Md. Shiddikur Rahman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /990 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.83ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Product Tab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.18 ▲1.96
Dashboard /wp-admin3.40 ▲0.0953.20 ▲2.83
Posts /wp-admin/edit.php3.45 ▲0.0949.83 ▼3.43
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.68 ▼12.63
Media Library /wp-admin/upload.php3.32 ▲0.0936.06 ▲2.80
Product Tabs /wp-admin/edit.php?post_type=c_p_tab3.3639.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ultimate Product Tab
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.16 ▼0.401.99 ▼0.6545.09 ▼0.50
Dashboard /wp-admin2,195 ▲185.56 ▲0.0386.36 ▼13.3141.17 ▼1.12
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0333.72 ▼3.6336.14 ▲0.51
Add New Post /wp-admin/post-new.php1,529 ▲323.04 ▼0.75642.58 ▼37.0049.05 ▼5.44
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.1699.51 ▼3.3042.88 ▼0.82
Product Tabs /wp-admin/edit.php?post_type=c_p_tab1,0661.9632.8733.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ultimate-product-tab/Ultimate_Custom_Product_Tabs.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Screenshot #1 (Demo Screenshots) image not found
You can take inspiration from this readme.txt

ultimate-product-tab/Ultimate_Custom_Product_Tabs.php 92% from 13 tests

"Ultimate Product Tab" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ultimate-product-tab.php" instead of "Ultimate_Custom_Product_Tabs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin279 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP132128279

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin