10% wp-grass

Code Review | wp grass

WordPress plugin wp grass scored 10% from 54 tests.

About plugin

  • Plugin page: wp-grass
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8.1
  • WordPress version: 5.9.2
  • First release: Feb 2, 2014
  • Latest release: Feb 3, 2014
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: ruocaled (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 779 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-grass/WpGrass_Plugin.php+36
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼2.53MB] [CPU: ▼341.17ms] Passed 4 tests

An overview of server-side resources used by wp grass
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.684.68 ▼50.07
Dashboard /wp-admin1.86 ▼1.554.04 ▼30.65
Posts /wp-admin/edit.php1.86 ▼1.784.36 ▼38.88
Add New Post /wp-admin/post-new.php1.86 ▼5.115.97 ▼1,245.06
Media Library /wp-admin/upload.php1.86 ▼1.444.22 ▼27.06
WP-Grass /wp-admin/plugins.php?page=WpGrass_PluginSettings1.864.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 3 new options
New WordPress options
WpGrass_Plugin__installed
WpGrass_Plugin_days
WpGrass_Plugin__version

Browser metrics Passed 4 tests

Checking browser requirements for wp grass
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲4216.23 ▲0.617.19 ▲0.332.73 ▲0.31
Dashboard /wp-admin2,899 ▲386.16 ▲0.00116.01 ▼16.64154.88 ▼2.72
Posts /wp-admin/edit.php2,695 ▲13.36 ▲0.1367.82 ▲3.98155.01 ▲19.54
Add New Post /wp-admin/post-new.php1,765 ▲7522.26 ▲1.66423.94 ▲16.09160.90 ▲9.98
Media Library /wp-admin/upload.php1,699 ▼25.54 ▲0.03135.83 ▼1.48195.56 ▲3.53
WP-Grass /wp-admin/plugins.php?page=WpGrass_PluginSettings1,0362.3753.37125.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    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 grass-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 3 options
    • WpGrass_Plugin__installed
    • WpGrass_Plugin__version
    • WpGrass_Plugin_days

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=WpGrass_PluginSettings
    • > User notice in wp-includes/functions.php+5768
    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 grass-style 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-grass/wp-grass.php:48

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Tags: Please add at least on tag
You can take inspiration from this readme.txt

wp-grass/wp-grass.php Passed 13 tests

The main file in "wp grass" v. 0.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
57 characters long description:
The grass grows higher while your blog is being inactive.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected474 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6160407458
CSS13016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods66
▷ Static methods00.00%
▷ Public methods3959.09%
▷ Protected methods2740.91%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
1 PNG file occupies 0.54MB with 0.17MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/wp-grass.png553.85KB379.96KB▼ 31.40%