84% wp-moon-phase-widget

Code Review | WP Moon Phase Widget

WordPress plugin WP Moon Phase Widget scored84%from 54 tests.

About plugin

  • Plugin page: wp-moon-phase-widget
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: Dec 26, 2019
  • Latest release: Dec 26, 2019
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: moonorganizer (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /3,083 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WP Moon Phase Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0246.62 ▼0.63
Dashboard /wp-admin3.59 ▲0.0251.51 ▼6.07
Posts /wp-admin/edit.php3.70 ▲0.0248.95 ▼0.32
Add New Post /wp-admin/post-new.php6.17 ▲0.0289.55 ▼12.21
Media Library /wp-admin/upload.php3.51 ▲0.0241.65 ▲3.03

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_wp-moon-phase-widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Moon Phase Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.284.02 ▲2.3044.32 ▲5.16
Dashboard /wp-admin2,198 ▲215.69 ▲0.0284.45 ▼6.1641.96 ▼0.81
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0035.42 ▼1.8739.35 ▲7.34
Add New Post /wp-admin/post-new.php1,545 ▼023.31 ▲0.41667.33 ▲18.3758.78 ▼2.57
Media Library /wp-admin/upload.php1,394 ▼34.19 ▼0.1396.72 ▼9.2743.66 ▼7.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_wp-moon-phase-widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just 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/wp-moon-phase-widget/classes/MoonPhaseWidget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: moonphase, astronomy, astrology, moon

wp-moon-phase-widget/wp-moon-phase-widget.php Passed 13 tests

The primary PHP file in "WP Moon Phase Widget" version 1.0.0 is used by WordPress to initiate all plugin functionality
48 characters long description:
This plugin adds moon phase widget to your site.

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
No dangerous file extensions were detected171 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22674101
PHP2304970

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin