10% 404-the-book-of-changes

Code Review | 404 The Book of Changes

WordPress plugin 404 The Book of Changes scored 10% from 54 tests.

About plugin

  • Plugin page: 404-the-book-of-c...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Dec 25, 2016
  • Latest release: Apr 4, 2018
  • Number of updates: 126
  • Update frequency: every 3.7 days
  • Top authors: montashov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,435 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/404-the-book-of-changes/404_the_book_of_changes.php+85
    Undefined variable: user_ID

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.71ms] Passed 4 tests

Analyzing server-side resources used by 404 The Book of Changes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.15 ▼5.44
Dashboard /wp-admin3.32 ▲0.0246.40 ▼4.98
Posts /wp-admin/edit.php3.37 ▲0.0247.56 ▲1.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.29 ▼9.48
Media Library /wp-admin/upload.php3.24 ▲0.0232.73 ▲1.14
404 The Book of Changes (I Ching) /wp-admin/options-general.php?page=options_404tboc3.2831.88

Server storage [IO: ▲2.61MB] [DB: ▲0.08MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 288 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
is-text-support404tboc
skin-404tboc
text-button-main404tboc
page-404tboc
text-button-continue404tboc
startText404tboc
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for 404 The Book of Changes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.21 ▼1.444.76 ▲2.9437.74 ▼3.42
Dashboard /wp-admin2,207 ▲195.83 ▲0.95100.02 ▼11.4936.83 ▼3.59
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0037.17 ▼1.7434.56 ▼0.06
Add New Post /wp-admin/post-new.php1,536 ▲323.08 ▼0.24648.39 ▲44.5860.22 ▲9.08
Media Library /wp-admin/upload.php1,389 ▲44.19 ▼0.0192.90 ▼0.3541.51 ▲1.89
404 The Book of Changes (I Ching) /wp-admin/options-general.php?page=options_404tboc9331.7726.8136.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/404-the-book-of-changes/random-text-wp-404-page.php
    • > /wp-content/plugins/404-the-book-of-changes/404_the_book_of_changes.php
    • > /wp-content/plugins/404-the-book-of-changes/admin-wp-404-page.php
    • > /wp-content/plugins/404-the-book-of-changes/skinsAdmin404.php
    • > /wp-content/plugins/404-the-book-of-changes/content_wp-404-page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 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
4 plugin tags: page 404, 404, i ching, error 404

404-the-book-of-changes/404_the_book_of_changes.php 77% from 13 tests

The entry point to "404 The Book of Changes" version 1.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("404-the-book-of-changes.php" instead of "404_the_book_of_changes.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 345 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,106 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS360551,458
PHP64336450
PO File27064198

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
80 PNG files occupy 2.43MB with 1.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
textsImages/35.png39.69KB15.11KB▼ 61.92%
textsImages/4.png39.67KB15.17KB▼ 61.75%
textsImages/43.png31.99KB12.29KB▼ 61.59%
skins/skin3/none.png3.54KB0.87KB▼ 75.41%
textsImages/36.png39.55KB15.05KB▼ 61.95%