73% javagee-one-heal-one-earth

Code Review | Javagee One Heal One Earth Plugin

WordPress plugin Javagee One Heal One Earth Plugin scored73%from 54 tests.

About plugin

  • Plugin page: javagee-one-heal-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2020
  • Latest release: Apr 24, 2020
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: javagee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /388 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Javagee One Heal One Earth Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.38 ▼4.63
Dashboard /wp-admin3.32 ▲0.0251.74 ▼1.17
Posts /wp-admin/edit.php3.37 ▲0.0147.66 ▲1.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.33 ▼6.13
Media Library /wp-admin/upload.php3.24 ▲0.0132.22 ▼0.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Javagee One Heal One Earth Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲16314.15 ▼0.2210.34 ▲8.5642.80 ▼0.31
Dashboard /wp-admin2,231 ▲464.85 ▼0.9999.03 ▼16.1236.58 ▼10.97
Posts /wp-admin/edit.php2,114 ▲251.99 ▼0.1435.70 ▲1.0632.42 ▼2.16
Add New Post /wp-admin/post-new.php1,536 ▲323.43 ▲0.15669.32 ▼9.3349.66 ▼2.53
Media Library /wp-admin/upload.php1,413 ▲224.15 ▼0.0793.72 ▼11.6243.95 ▼0.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'JavageeOneHealOneEarth\OHOE_OneHealOneEarth' does not have a method 'plugin_deactivate'
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function JavageeOneHealOneEarth\\plugin_dir_path() in wp-content/plugins/javagee-one-heal-one-earth/OneHealOneEarth.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
The official readme.txt might help

javagee-one-heal-one-earth/OneHealOneEarth.php 77% from 13 tests

"Javagee One Heal One Earth Plugin" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("javagee-one-heal-one-earth.php" instead of "OneHealOneEarth.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 227 characters long)

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
Good job! No executable or dangerous file extensions detected18,833 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS44209,383
SVG30129,299
PHP16574150
JavaScript1061

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/oneheal.png25.59KB12.04KB▼ 52.98%