10% the-moon

Code Review | The Moon - Current Phase and Next Eclipse

WordPress plugin The Moon - Current Phase and Next Eclipse scored10%from 54 tests.

About plugin

  • Plugin page: the-moon
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2021
  • Latest release: Nov 1, 2021
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: offsky (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /1,240 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.97MB] [CPU: ▼57.23ms] Passed 4 tests

An overview of server-side resources used by The Moon - Current Phase and Next Eclipse
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.27 ▼37.71
Dashboard /wp-admin2.05 ▼1.306.08 ▼54.89
Posts /wp-admin/edit.php2.05 ▼1.315.42 ▼42.71
Add New Post /wp-admin/post-new.php2.05 ▼3.845.08 ▼93.62
Media Library /wp-admin/upload.php2.05 ▼1.185.25 ▼27.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for The Moon - Current Phase and Next Eclipse
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲15315.74 ▲1.4635.20 ▲33.3341.77 ▼6.97
Dashboard /wp-admin2,206 ▲185.80 ▲0.9194.94 ▼20.5139.04 ▼6.52
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.77 ▲5.6834.15 ▲1.25
Add New Post /wp-admin/post-new.php6,189 ▲4,64719.61 ▲1.21889.27 ▲283.6136.78 ▼17.22
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.1799.92 ▲4.0247.96 ▲4.27

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
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_complications_moon_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-moon/includes/Complications_Moon_Widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: constellation, lunar, eclipse, full moon, phases...

the-moon/complications-moon.php 92% from 13 tests

The main PHP file in "The Moon - Current Phase and Next Eclipse" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("the-moon.php" instead of "complications-moon.php")

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
Success! There were no dangerous files found in this plugin2,254 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
Markdown376401,918
JavaScript4733193
PHP66059143

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin