89% category-and-post-tab

Code Review | Tabs

WordPress plugin Tabs scored89%from 54 tests.

About plugin

  • Plugin page: category-and-post...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Feb 11, 2018
  • Number of updates: 22
  • Update frequency: every 27.6 days
  • Top authors: ikhodal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,004 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Tabs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.97 ▼5.14
Dashboard /wp-admin3.34 ▲0.0445.14 ▼3.27
Posts /wp-admin/edit.php3.45 ▲0.1049.17 ▲4.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0496.56 ▼4.00
Media Library /wp-admin/upload.php3.26 ▲0.0432.09 ▲0.62

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_categoryposttab
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Tabs
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲19013.82 ▼0.565.91 ▲4.0137.44 ▼7.00
Dashboard /wp-admin2,216 ▲344.89 ▼0.98108.39 ▲3.9940.94 ▼2.32
Posts /wp-admin/edit.php2,099 ▲102.02 ▼0.0239.70 ▲1.1336.73 ▲3.44
Add New Post /wp-admin/post-new.php1,521 ▲723.22 ▲5.77650.21 ▼41.5759.44 ▼0.87
Media Library /wp-admin/upload.php1,398 ▲74.16 ▼0.1197.38 ▼2.1542.85 ▲0.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_categoryposttab
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Add a description for screenshot #19 in category-and-post-tab/assets to your readme.txt
You can look at the official readme.txt

category-and-post-tab/plugin.php 92% from 13 tests

The principal PHP file in "Tabs" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("category-and-post-tab.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,252 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12188342792
JavaScript2224238
PO File1490114
CSS298108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.33
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ac_bottom.png0.28KB0.27KB▼ 5.54%
assets/images/right-icon.png0.36KB0.44KB0.00%
assets/images/view-more.png0.36KB0.33KB▼ 7.14%
assets/images/no-img.png3.66KB0.88KB▼ 76.05%
assets/images/view.png1.80KB1.14KB▼ 36.27%