72% codepress-admin-columns

Code Review | Admin Columns

WordPress plugin Admin Columns scored72%from 54 tests.

About plugin

  • Plugin page: codepress-admin-c...
  • Plugin version: 4.6.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2011
  • Latest release: Aug 9, 2023
  • Number of updates: 237
  • Update frequency: every 18.0 days
  • Top authors: tschutter (54.43%)codepress (31.22%)engelen (15.19%)

Code review

54 tests

User reviews

1565 reviews

Install metrics

100,000+ active /2,468,352 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.45MB] [CPU: ▲7.49ms] Passed 4 tests

A check of server-side resources used by Admin Columns
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.44 ▼8.52
Dashboard /wp-admin5.17 ▲1.8360.60 ▲2.21
Posts /wp-admin/edit.php5.54 ▲2.1973.98 ▲26.82
Add New Post /wp-admin/post-new.php7.71 ▲1.83103.20 ▲9.46
Media Library /wp-admin/upload.php5.36 ▲2.1462.07 ▲27.56

Server storage [IO: ▲4.68MB] [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: 867 new files
Database: 1 new table, 6 new options
New tables
wp_admin_columns
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Admin Columns
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.30 ▼1.075.07 ▲3.2844.72 ▲0.42
Dashboard /wp-admin2,215 ▲304.83 ▼0.06109.38 ▲9.8845.31 ▲1.99
Posts /wp-admin/edit.php2,182 ▲932.50 ▲0.4145.17 ▲8.5636.03 ▼0.22
Add New Post /wp-admin/post-new.php1,542 ▼023.04 ▲4.60593.34 ▼8.0751.61 ▼0.06
Media Library /wp-admin/upload.php1,424 ▲364.44 ▲0.20103.23 ▲3.4643.04 ▼2.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_admin_columns
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 474× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AC\\Column' not found in wp-content/plugins/codepress-admin-columns/classes/Column/Comment/Response.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'AC\\Vendor\\DI\\Definition\\Source\\Autowiring' not found in wp-content/plugins/codepress-admin-columns/vendor/php-di/php-di/src/Definition/Source/NoAutowiring.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AC\\Settings\\Column' not found in wp-content/plugins/codepress-admin-columns/classes/Settings/Column/PathScope.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AC\\Settings\\Column' not found in wp-content/plugins/codepress-admin-columns/classes/Settings/Column/MissingImageSize.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'AC\\Expirable' not found in wp-content/plugins/codepress-admin-columns/classes/Transient.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'AC\\ListTable' not found in wp-content/plugins/codepress-admin-columns/classes/ListTable/Post.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AC\\Preferences\\Site' not found in wp-content/plugins/codepress-admin-columns/classes/ColumnSize/UserPreference.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'AC\\Admin\\Colors\\ColorReader' not found in wp-content/plugins/codepress-admin-columns/classes/Admin/Colors/ColorRepository.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'AC\\Vendor\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/codepress-admin-columns/vendor/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AC\\Settings\\Column\\Pro' not found in wp-content/plugins/codepress-admin-columns/classes/Settings/Column/Pro/Sorting.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
  • Screenshots: A description for screenshot #9 is missing in codepress-admin-columns/assets to your readme.txt
  • Screenshots: Please add an image for screenshot #1 (Settings page for Post(type) columns.)
You can take inspiration from this readme.txt

codepress-admin-columns/codepress-admin-columns.php 92% from 13 tests

"Admin Columns" version 4.6.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 149 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected60,836 lines of code in 781 files:
LanguageFilesBlank linesComment linesLines of code
PO File2313,53616,98827,689
PHP7027,9348,86627,176
JavaScript125244523,822
Markdown104050876
JSON600496
CSS17130116448
SVG1146329

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 210)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.13
▷ Minimum class complexity1.00
▷ Maximum class complexity303.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity210.00
Code structure
Namespaces120
Interfaces59
Traits6
Classes560
▷ Abstract classes356.25%
▷ Concrete classes52593.75%
▷ Final classes5911.24%
Methods2,671
▷ Static methods582.17%
▷ Public methods2,15280.57%
▷ Protected methods2549.51%
▷ Private methods2659.92%
Functions51
▷ Named functions2956.86%
▷ Anonymous functions2243.14%
Constants214
▷ Global constants52.34%
▷ Class constants20997.66%
▷ Public constants19995.22%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
44 PNG files occupy 0.60MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/images/addons/toolset-types-icon-alt.png1.67KB0.75KB▼ 55.06%
assets/images/tooltip/export-csv.png121.48KB57.25KB▼ 52.88%
assets/images/tooltip/filter.png10.54KB4.71KB▼ 55.35%