78% addfreespace

Code Review | addfreespace

WordPress plugin addfreespace scored 78% from 54 tests.

About plugin

  • Plugin page: addfreespace
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.2
  • WordPress version: 5.8.1
  • First release: Sep 27, 2013
  • Latest release: May 14, 2015
  • Number of updates: 6
  • Update frequency: every 99.5 days
  • Top authors: kazunii (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.72MB] [CPU: ▼191.61ms] Passed 4 tests

Analyzing server-side resources used by addfreespace
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.1044.56 ▲4.93
Dashboard /wp-admin1.93 ▼1.126.05 ▼31.66
Posts /wp-admin/edit.php1.93 ▼1.176.29 ▼40.95
Add New Post /wp-admin/post-new.php1.93 ▼3.505.81 ▼665.79
Media Library /wp-admin/upload.php1.93 ▼1.077.20 ▼28.03
addfreespace /wp-admin/options-general.php?page=addfreespace/addfreespace.php1.936.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for addfreespace
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,692 ▲9615.92 ▲0.3910.05 ▲1.2447.47 ▼1.37
Dashboard /wp-admin2,986 ▲526.04 ▼0.09150.43 ▼2.13103.91 ▼16.00
Posts /wp-admin/edit.php2,752 ▲132.75 ▲0.0671.17 ▼2.7698.34 ▲0.04
Add New Post /wp-admin/post-new.php1,615 ▼018.45 ▼2.64372.78 ▲81.04138.57 ▲27.26
Media Library /wp-admin/upload.php1,823 ▲135.09 ▲0.01159.09 ▲6.22123.98 ▲7.91
addfreespace /wp-admin/options-general.php?page=addfreespace/addfreespace.php1,9112.3765.37113.41

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
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=addfreespace/addfreespace.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=addfreespace/addfreespace.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the addfreespace_func1 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=addfreespace/addfreespace.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the addfreespace_func2 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=addfreespace/addfreespace.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the addfreespace_func3 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=addfreespace/addfreespace.php
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the addfreespace_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please take a closer look at the following
  • 1× 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/addfreespace/addfreespace.php:33

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: No tags were detected
  • Donate link: Invalid URI found ("")
The official readme.txt is a good inspiration

addfreespace/addfreespace.php Passed 13 tests

The main PHP script in "addfreespace" version 0.1.3 is automatically included on every request by WordPress
121 characters long description:
記事上下に自由な記述ができるフリースペースを加えることができます。You can add freespace.

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
No dangerous file extensions were detected1,053 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript328109547
PHP23943485
CSS10021

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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