84% alkanecode

Code Review | Alkane Code

WordPress plugin Alkane Code scored84%from 54 tests.

About plugin

  • Plugin page: alkanecode
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 13, 2019
  • Latest release: Aug 25, 2022
  • Number of updates: 26
  • Update frequency: every 43.9 days
  • Top authors: alkanesolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,152 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.13MB] [CPU: ▼8.92ms] Passed 4 tests

Analyzing server-side resources used by Alkane Code
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1436.84 ▼2.31
Dashboard /wp-admin3.45 ▲0.1448.66 ▲0.27
Posts /wp-admin/edit.php3.50 ▲0.1446.67 ▲4.17
Add New Post /wp-admin/post-new.php4.94 ▼0.9557.50 ▼35.29
Media Library /wp-admin/upload.php3.37 ▲0.1434.94 ▲1.66
Alkane Code /wp-admin/options-general.php?page=alkanecode_settings_page3.3229.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 206 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

Checking browser requirements for Alkane Code
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲11813.49 ▼1.0913.46 ▲11.8844.14 ▲3.98
Dashboard /wp-admin2,199 ▲225.59 ▼0.0793.28 ▲4.5442.36 ▲1.67
Posts /wp-admin/edit.php2,104 ▲41.95 ▲0.0137.12 ▲0.0132.77 ▼2.52
Add New Post /wp-admin/post-new.php1,529 ▲123.23 ▲0.12660.04 ▼0.9653.84 ▼8.96
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0993.82 ▼2.9140.16 ▼2.02
Alkane Code /wp-admin/options-general.php?page=alkanecode_settings_page1,4262.0324.5730.89

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=alkanecode_settings_page
    • > Notice in wp-content/plugins/alkanecode/alkanecode.php+450
    Trying to access array offset on value of type bool

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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: enlighter, syntax highlighter, prism, code snippets, code editor...

alkanecode/alkanecode.php Passed 13 tests

The main PHP script in "Alkane Code" version 1.0.9 is automatically included on every request by WordPress
53 characters long description:
A TinyMCE code editor with Prism syntax highlighting.

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
There were no executable files found in this plugin871 lines of code in 195 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1826727458
PHP28967365
SVG10129
CSS1041419

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin