84% custom-columns

Code Review | Custom Columns

WordPress plugin Custom Columns scored 84% from 54 tests.

About plugin

  • Plugin page: custom-columns
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2012
  • Latest release: Mar 30, 2014
  • Number of updates: 10
  • Update frequency: every 65.8 days
  • Top authors: fpalme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 2,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.62ms] Passed 4 tests

A check of server-side resources used by Custom Columns
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.53 ▲0.02
Dashboard /wp-admin3.44 ▲0.1444.45 ▼5.24
Posts /wp-admin/edit.php3.55 ▲0.2045.07 ▼6.58
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.02 ▼14.67
Media Library /wp-admin/upload.php3.36 ▲0.1336.57 ▲3.40
Custom Columns /wp-admin/options-general.php?page=custom-columns3.3332.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Columns
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.15 ▼1.431.69 ▼0.2242.49 ▼0.83
Dashboard /wp-admin2,213 ▲225.88 ▲0.9895.73 ▼26.3538.38 ▼8.86
Posts /wp-admin/edit.php2,093 ▲12.00 ▲0.0134.32 ▼2.7737.77 ▲5.47
Add New Post /wp-admin/post-new.php1,536 ▲323.26 ▲0.00674.89 ▲25.7553.53 ▲2.30
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.13103.10 ▲4.1044.31 ▼2.23
Custom Columns /wp-admin/options-general.php?page=custom-columns9592.0638.1126.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'CustomColumnsBase' not found in wp-content/plugins/custom-columns/CustomColumnsPage.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/custom-columns/CustomColumns.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'CustomColumnsBase' not found in wp-content/plugins/custom-columns/CustomColumnsManager.class.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Manage custom columns), #2 (Display custom columns)
The official readme.txt is a good inspiration

custom-columns/CustomColumns.php 92% from 13 tests

Analyzing the main PHP file in "Custom Columns" version 1.0
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("custom-columns.php" instead of "CustomColumns.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,238 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6189340712
CSS1562293
JavaScript18980233

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.20
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods617.65%
▷ Public methods1955.88%
▷ Protected methods1441.18%
▷ Private methods12.94%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.04KB13.04KB▼ 53.52%
screenshot-2.png48.80KB21.45KB▼ 56.04%