84% cornify-for-wordpress

Code Review | Cornify for WordPress

WordPress plugin Cornify for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: cornify-for-wordp...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.3.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2011
  • Latest release: Dec 14, 2019
  • Number of updates: 13
  • Update frequency: every 244.4 days
  • Top authors: BandonRandon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /3,577 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.23ms] Passed 4 tests

An overview of server-side resources used by Cornify for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.72 ▼3.32
Dashboard /wp-admin3.31 ▼0.0444.84 ▼18.78
Posts /wp-admin/edit.php3.36 ▲0.0048.35 ▲0.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.26 ▼26.94
Media Library /wp-admin/upload.php3.24 ▲0.0036.46 ▲2.94

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Cornify for WordPress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11013.62 ▼0.985.85 ▲4.0536.23 ▼8.29
Dashboard /wp-admin2,200 ▲94.86 ▼1.04130.96 ▲25.8249.09 ▲4.65
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0439.20 ▼3.6934.41 ▼3.09
Add New Post /wp-admin/post-new.php1,538 ▲2423.31 ▲5.76616.72 ▼44.3950.04 ▼5.97
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0698.99 ▼2.8741.93 ▼2.96

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cornify-for-wordpress/cornify-wordpress.php:22

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (A cornified site) image missing
The official readme.txt is a good inspiration

cornify-for-wordpress/cornify-wordpress.php 92% from 13 tests

This is the main PHP file of "Cornify for WordPress" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cornify-for-wordpress.php" instead of "cornify-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin192 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12327184
PHP17158

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.39MB with 0.29MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png402.67KB109.31KB▼ 72.85%