78% posts-columns-manager

Code Review | Posts Columns Manager

WordPress plugin Posts Columns Manager scored78%from 54 tests.

About plugin

  • Plugin page: posts-columns-man...
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2021
  • Latest release: Jun 26, 2023
  • Number of updates: 31
  • Update frequency: every 27.7 days
  • Top authors: zahardoc (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active /3,534 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.94ms] Passed 4 tests

Server-side resources used by Posts Columns Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.44 ▲0.27
Dashboard /wp-admin3.54 ▲0.2449.75 ▼12.42
Posts /wp-admin/edit.php3.60 ▲0.2452.22 ▲3.83
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.13 ▼1.77
Media Library /wp-admin/upload.php3.40 ▲0.1740.62 ▲2.16
PCM Settings /wp-admin/options-general.php?page=pcm_settings3.5241.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Posts Columns Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.48 ▲0.181.68 ▼0.1138.25 ▼4.06
Dashboard /wp-admin2,201 ▲245.70 ▲0.1190.77 ▼13.7942.18 ▼3.67
Posts /wp-admin/edit.php2,106 ▲62.05 ▲0.0438.89 ▲2.0938.09 ▼0.79
Add New Post /wp-admin/post-new.php1,548 ▲1723.10 ▼0.20611.20 ▼78.2055.74 ▼6.73
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.04101.07 ▼14.8645.64 ▼3.08
PCM Settings /wp-admin/options-general.php?page=pcm_settings1,0461.8024.2932.52

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

Smoke tests 50% 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 0% 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 take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/posts-columns-manager/templates/range.php
    • > /wp-content/plugins/posts-columns-manager/templates/text.php
    • > /wp-content/plugins/posts-columns-manager/templates/link.php
    • > /wp-content/plugins/posts-columns-manager/templates/settings/select.php
  • 41× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: href in wp-content/plugins/posts-columns-manager/templates/link.php on line 8
    • > PHP Fatal error
      Uncaught Error: Interface 'PCM\\Interfaces\\Renderer' not found in wp-content/plugins/posts-columns-manager/app/helpers/class-renderer.php:7
    • > PHP Notice
      Undefined variable: param_from in wp-content/plugins/posts-columns-manager/templates/range.php on line 13
    • > PHP Notice
      Undefined variable: param_to in wp-content/plugins/posts-columns-manager/templates/range.php on line 14
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/posts-columns-manager/templates/settings/hidden.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/posts-columns-manager/templates/settings/hidden.php:7
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/posts-columns-manager/templates/settings/select.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/posts-columns-manager/templates/settings/text.php:8
    • > PHP Notice
      Undefined variable: label in wp-content/plugins/posts-columns-manager/templates/link.php on line 8
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/posts-columns-manager/templates/settings/checkbox.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === posts-columns-manager === )
You can take inspiration from this readme.txt

posts-columns-manager/posts-columns-manager.php Passed 13 tests

The primary PHP file in "Posts Columns Manager" version 1.7.0 is used by WordPress to initiate all plugin functionality
109 characters long description:
Manage custom columns in the posts editor. You can: add columns, sort and filter posts in the custom columns.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,249 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP243663071,128
CSS112086
JavaScript112035

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity63.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces7
Interfaces2
Traits1
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods92
▷ Static methods1718.48%
▷ Public methods5054.35%
▷ Protected methods3234.78%
▷ Private methods1010.87%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.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
There are no PNG files in this plugin