100% adrizer-cortex

Code Review | Cortex

WordPress plugin Cortex scored 100% from 54 tests.

About plugin

  • Plugin page: adrizer-cortex
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • 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 / 674 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼312.86ms] Passed 4 tests

An overview of server-side resources used by Cortex
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0969.91 ▼25.44
Dashboard /wp-admin3.51 ▲0.1039.35 ▼2.09
Posts /wp-admin/edit.php3.74 ▲0.0947.33 ▲3.52
Add New Post /wp-admin/post-new.php6.98 ▲0.00105.19 ▼1,226.39
Media Library /wp-admin/upload.php3.39 ▲0.0930.70 ▲2.49
AdRizer Settings /wp-admin/options-general.php?page=cortex_settings3.4529.88

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Cortex: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.91 ▲0.546.13 ▼2.192.13 ▼0.29
Dashboard /wp-admin2,896 ▲386.09 ▼0.11152.96 ▲13.31153.83 ▼10.35
Posts /wp-admin/edit.php2,693 ▼13.36 ▲0.1372.36 ▲8.02188.28 ▲45.40
Add New Post /wp-admin/post-new.php1,720 ▲5921.81 ▼0.47439.19 ▲22.12159.00 ▼48.71
Media Library /wp-admin/upload.php1,706 ▲85.46 ▼0.06179.93 ▲28.83186.42 ▼45.11
AdRizer Settings /wp-admin/options-general.php?page=cortex_settings1,7873.2994.75143.96

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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: analytics, cortex

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

The main PHP script in "Cortex" version 1.0.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adrizer-cortex.php" instead of "cortex.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,586 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP8261137759
CSS210719673
JavaScript43830154

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin