84% perfect-columns

Code Review | Perfect Columns

WordPress plugin Perfect Columns scored 84% from 54 tests.

About plugin

  • Plugin page: perfect-columns
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 7, 2014
  • Latest release: Jul 12, 2014
  • Number of updates: 13
  • Update frequency: every 2.8 days
  • Top authors: moto_485 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 2,179 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.25ms] Passed 4 tests

An overview of server-side resources used by Perfect Columns
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.84 ▼2.80
Dashboard /wp-admin3.33 ▲0.0252.08 ▼0.20
Posts /wp-admin/edit.php3.38 ▲0.0252.76 ▲5.15
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.11 ▲2.83
Media Library /wp-admin/upload.php3.25 ▲0.0245.92 ▲8.73

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Perfect Columns
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▼914.48 ▲1.041.84 ▼0.0950.44 ▲3.26
Dashboard /wp-admin2,206 ▼04.91 ▼0.97112.22 ▲1.5441.74 ▼0.86
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0239.68 ▲0.5834.59 ▼0.01
Add New Post /wp-admin/post-new.php1,526 ▼723.33 ▲0.06588.24 ▼100.4856.42 ▼18.12
Media Library /wp-admin/upload.php1,391 ▲34.20 ▲0.02111.94 ▲4.0045.26 ▼1.86

Uninstaller [IO: ✅] [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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/perfect-columns/perfect-columns.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
5 plugin tags: grid, shortcode, mobile, columns, rows

perfect-columns/perfect-columns.php Passed 13 tests

The entry point to "Perfect Columns" version 1.2.0 is a PHP file that has certain tags in its header comment area
78 characters long description:
Add shortcodes to easily create up to 12 equal columns in your pages and posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected471 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1226188
CSS1220121
PHP1155195
LESS1131867

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
13 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/col-3.png1.17KB0.17KB▼ 85.21%
img/col-9.png1.13KB0.18KB▼ 84.24%
img/col-8.png1.17KB0.20KB▼ 83.29%
img/col-12.png1.21KB0.19KB▼ 84.39%
img/col-5.png1.09KB0.17KB▼ 84.03%