84% category-posts-tabber

Code Review | Category Posts Tabber

WordPress plugin Category Posts Tabber scored 84% from 54 tests.

About plugin

  • Plugin page: category-posts-ta...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7.2
  • WordPress version: 5.8.1
  • First release: Feb 18, 2016
  • Latest release: Jun 10, 2021
  • Number of updates: 22
  • Update frequency: every 88.1 days
  • Top authors: phuptqn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,805 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼141.78ms] Passed 4 tests

This is a short check of server-side resources used by Category Posts Tabber
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0640.15 ▲8.53
Dashboard /wp-admin3.11 ▲0.0535.11 ▼2.37
Posts /wp-admin/edit.php3.16 ▲0.0543.47 ▲1.25
Add New Post /wp-admin/post-new.php5.47 ▲0.0492.72 ▼556.86
Media Library /wp-admin/upload.php3.05 ▲0.0433.47 ▼9.12

Server storage [IO: ▲0.02MB] [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: 5 new files
Database: no new tables, 1 new option
New WordPress options
widget_category-posts-tabber

Browser metrics Passed 4 tests

This is an overview of browser requirements for Category Posts Tabber
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.86 ▲0.017.25 ▼1.3649.83 ▲1.08
Dashboard /wp-admin2,970 ▲366.12 ▼0.04141.50 ▲5.80114.37 ▼0.04
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0165.20 ▼0.8883.86 ▼4.42
Add New Post /wp-admin/post-new.php1,500 ▼018.48 ▲0.10369.87 ▲14.08107.13 ▼5.89
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.01155.60 ▲13.17118.21 ▲1.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_category-posts-tabber

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
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-posts-tabber/cpt-widget.php:11

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: tabs, categories, posts, widget

category-posts-tabber/cpt-widget.php 92% from 13 tests

The principal PHP file in "Category Posts Tabber" v. 2.2.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("category-posts-tabber.php" instead of "cpt-widget.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 plugin384 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1368239
CSS1183107
JavaScript227938

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity38.00
▷ Minimum class complexity38.00
▷ Maximum class complexity38.00
Average method complexity6.29
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin