83% good-morning-planet

Code Review | Good Morning Planet

WordPress plugin Good Morning Planet scored83%from 54 tests.

About plugin

  • Plugin page: good-morning-planet
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2016
  • Latest release: Apr 11, 2016
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: goodmorningplanet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /810 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by Good Morning Planet
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.79 ▼3.89
Dashboard /wp-admin3.31 ▲0.0042.79 ▼6.80
Posts /wp-admin/edit.php3.36 ▲0.0045.57 ▼1.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.82 ▲3.89
Media Library /wp-admin/upload.php3.23 ▲0.0031.91 ▼6.36

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Good Morning Planet
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.65 ▼0.721.69 ▼0.1539.83 ▼5.96
Dashboard /wp-admin2,209 ▲214.85 ▼0.0496.87 ▼16.8841.89 ▼7.17
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0239.89 ▼0.8134.78 ▼3.71
Add New Post /wp-admin/post-new.php1,533 ▲1923.27 ▲5.80587.30 ▼109.5454.07 ▼3.14
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0397.37 ▼4.6745.43 ▲0.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/good-morning-planet/gmp-travels-plugin.php:12

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

readme.txt 88% 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 need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === good-morning-planet === )
  • Screenshots: Add an image for screenshot #1 (Display your travel path on your blog post.)
You can look at the official readme.txt

good-morning-planet/gmp-travels-plugin.php 92% from 13 tests

The primary PHP file in "Good Morning Planet" version 1.0.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("good-morning-planet.php" instead of "gmp-travels-plugin.php")

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
Success! There were no dangerous files found in this plugin273 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG111126
LESS18076
JavaScript16429
PHP181227
JSON10014
CSS1011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions2
▷ Named functions2100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.89MB with 0.58MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png360.26KB107.97KB▼ 70.03%
assets/screenshot-2.png171.53KB50.45KB▼ 70.59%
assets/screenshot-1.png224.54KB66.61KB▼ 70.33%
assets/banner-772x250.png152.59KB76.49KB▼ 49.87%