84% cyberus-key

Code Review | Cyberus Key

WordPress plugin Cyberus Key scored84%from 54 tests.

About plugin

  • Plugin page: cyberus-key
  • Plugin version: 1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 30, 2021
  • Latest release: Mar 19, 2023
  • Number of updates: 4
  • Update frequency: every 111.5 days
  • Top authors: piotrwolski1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /392 total downloads

Benchmarks

Plugin footprint 83% from 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.66MB] [CPU: ▼23.43ms] Passed 4 tests

An overview of server-side resources used by Cyberus Key
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.01 ▼3.24
Dashboard /wp-admin3.33 ▼0.0142.77 ▼15.83
Posts /wp-admin/edit.php3.38 ▲0.0348.26 ▼3.33
Add New Post /wp-admin/post-new.php3.21 ▼2.6837.18 ▼71.33
Media Library /wp-admin/upload.php3.25 ▲0.0332.64 ▼0.25
Cyberus key settings /wp-admin/admin.php?page=cyberkey_settings3.2230.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Cyberus Key
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.26 ▼1.121.76 ▲0.1644.07 ▲2.58
Dashboard /wp-admin2,200 ▲125.80 ▲0.91102.61 ▼12.2243.98 ▼0.92
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0339.10 ▼3.1735.89 ▼1.25
Add New Post /wp-admin/post-new.php1,533 ▲523.23 ▲4.77664.45 ▲52.2068.31 ▲16.24
Media Library /wp-admin/upload.php1,388 ▼34.14 ▼0.1294.61 ▼3.1141.73 ▼4.26
Cyberus key settings /wp-admin/admin.php?page=cyberkey_settings8252.0622.5525.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyberus-key/inc/cyberkey-class.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyberus-key/inc/cyberkey-login.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyberus-key/inc/cyberkey-scripts.php:43

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #3 is missing in cyberus-key/assets to your readme.txt
You can take inspiration from this readme.txt

cyberus-key/cyberus-main.php 92% from 13 tests

The main file in "Cyberus Key" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("cyberus-key.php" instead of "cyberus-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin630 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5135181567
JavaScript26149
CSS16814

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.67
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1052.63%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
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
There were not PNG files found in your plugin