83% nightpilot

Code Review | Cryptochain

WordPress plugin Cryptochain scored83%from 54 tests.

About plugin

  • Plugin page: nightpilot
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Apr 13, 2022
  • Latest release: Apr 14, 2022
  • Number of updates: 2
  • Update frequency: every 27.5 days
  • Top authors: nightpilot2021 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /198 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.39ms] Passed 4 tests

A check of server-side resources used by Cryptochain
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0055.90 ▲4.85
Dashboard /wp-admin3.31 ▲0.0052.75 ▲0.37
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▼5.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.27 ▼16.82
Media Library /wp-admin/upload.php3.23 ▲0.0035.63 ▲0.43

Server storage [IO: ▲1.07MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/nightpilot/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cryptochain
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.371.84 ▲0.2043.48 ▼1.18
Dashboard /wp-admin2,221 ▲215.85 ▼0.05101.69 ▼5.4638.60 ▼3.67
Posts /wp-admin/edit.php2,097 ▼32.02 ▼0.0335.41 ▲0.5530.02 ▼5.93
Add New Post /wp-admin/post-new.php1,526 ▼2117.54 ▼5.50690.88 ▲44.3560.34 ▼5.98
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.07101.84 ▼7.6844.07 ▼3.36

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nightpilot/cryptochain.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nightpilot/functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/nightpilot/front.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
You can look at the official readme.txt

nightpilot/cryptochain.php 85% from 13 tests

The main PHP script in "Cryptochain" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Git Repository: Please do not include Git repositories in your plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("nightpilot.php" instead of "cryptochain.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
No dangerous file extensions were detected2,103 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP74021191,454
JavaScript47146433
CSS42818216

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
template/woocommerce/myaccount/loader.png20.13KB8.81KB▼ 56.22%
image/loader.png20.13KB8.81KB▼ 56.22%