10% advanced-custom-columns

Code Review | Advanced Custom Columns

WordPress plugin Advanced Custom Columns scored10%from 54 tests.

About plugin

  • Plugin page: advanced-custom-c...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.1
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: Jun 13, 2017
  • Number of updates: 3
  • Update frequency: every 4.7 days
  • Top authors: francois09 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /946 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/advanced-custom-columns/ACC_columns.php+114
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼61.56ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Columns
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.92 ▼40.61
Dashboard /wp-admin2.16 ▼1.187.74 ▼58.01
Posts /wp-admin/edit.php2.16 ▼1.195.98 ▼47.15
Add New Post /wp-admin/post-new.php2.16 ▼3.727.26 ▼100.48
Media Library /wp-admin/upload.php2.16 ▼1.067.72 ▼31.18
Custom columns /wp-admin/options-general.php?page=custom_admin_columns_for_sorting_and_filtering2.177.23

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Columns
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.34 ▼0.291.85 ▼0.2243.64 ▲0.22
Dashboard /wp-admin2,202 ▲255.62 ▲0.0885.55 ▼5.1439.05 ▼1.65
Posts /wp-admin/edit.php2,101 ▲11.97 ▼0.0636.15 ▼0.9735.30 ▲2.28
Add New Post /wp-admin/post-new.php1,529 ▼023.47 ▼0.08703.92 ▲65.8756.02 ▲7.72
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.06109.19 ▲6.7649.13 ▲1.20
Custom columns /wp-admin/options-general.php?page=custom_admin_columns_for_sorting_and_filtering8481.9921.7126.22

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/advanced-custom-columns/ACC_columns.php+114
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=custom_admin_columns_for_sorting_and_filtering
    • > Notice in wp-content/plugins/advanced-custom-columns/ACC_columns.php+119
    Trying to access array offset on value of type bool

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/advanced-custom-columns/ACC_settings.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advanced-custom-columns/advanced-custom-columns.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: custom post type, custom admin columns, sorting, filtering

advanced-custom-columns/advanced-custom-columns.php Passed 13 tests

This is the main PHP file of "Advanced Custom Columns" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
Add custom admin columns to post types to provide sorting and filtering through these extra columns

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin311 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39094311

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.50
▷ Minimum class complexity2.00
▷ Maximum class complexity49.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods940.91%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png57.59KB23.56KB▼ 59.09%
assets/icon-256x256.png9.82KB3.48KB▼ 64.54%
assets/screenshot-1.png22.94KB10.64KB▼ 53.63%