90% adrizer-cortex

Code Review | Cortex

WordPress plugin Cortex scored90%from 54 tests.

About plugin

  • Plugin page: adrizer-cortex
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 7, 2017
  • Latest release: Nov 29, 2017
  • Number of updates: 17
  • Update frequency: every 4.6 days
  • Top authors: adrizer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /873 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.07MB] [CPU: ▼1.75ms] Passed 4 tests

An overview of server-side resources used by Cortex
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0649.64 ▲5.89
Dashboard /wp-admin3.40 ▲0.0548.98 ▼12.55
Posts /wp-admin/edit.php3.51 ▲0.1554.49 ▲1.96
Add New Post /wp-admin/post-new.php5.98 ▲0.0994.83 ▲2.36
Media Library /wp-admin/upload.php3.32 ▲0.0936.27 ▲1.25
AdRizer Settings /wp-admin/options-general.php?page=cortex_settings3.3740.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Cortex
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲6913.56 ▼0.791.84 ▼0.0751.44 ▲8.38
Dashboard /wp-admin2,225 ▲285.86 ▲0.01106.95 ▲0.8842.67 ▼1.51
Posts /wp-admin/edit.php2,104 ▲12.06 ▲0.0940.90 ▲2.7737.42 ▼1.08
Add New Post /wp-admin/post-new.php1,548 ▲323.39 ▲0.26651.91 ▼19.7663.30 ▲8.95
Media Library /wp-admin/upload.php1,404 ▲44.14 ▼0.1296.71 ▼9.6842.62 ▲0.28
AdRizer Settings /wp-admin/options-general.php?page=cortex_settings1,3372.1631.5764.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: cortex, analytics

adrizer-cortex/cortex.php 92% from 13 tests

"Cortex" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("adrizer-cortex.php" instead of "cortex.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,586 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8261137759
CSS210719673
JavaScript43830154

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.00
▷ Minimum class complexity5.00
▷ Maximum class complexity33.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods31
▷ Static methods13.23%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin