83% astronomy-picture-of-the-day

Code Review | Astronomy Picture Of the Day

WordPress plugin Astronomy Picture Of the Day scored83%from 54 tests.

About plugin

  • Plugin page: astronomy-picture...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 10, 2017
  • Latest release: Feb 14, 2017
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: DaWoody (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.83ms] Passed 4 tests

This is a short check of server-side resources used by Astronomy Picture Of the Day
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1648.45 ▲7.53
Dashboard /wp-admin3.33 ▲0.0348.51 ▼3.47
Posts /wp-admin/edit.php3.39 ▲0.0346.34 ▼0.62
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.18 ▼7.17
Media Library /wp-admin/upload.php3.26 ▲0.0336.11 ▼0.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Astronomy Picture Of the Day
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.25 ▼0.041.64 ▲0.1239.05 ▼0.12
Dashboard /wp-admin2,208 ▲285.59 ▼0.0787.77 ▼0.6040.50 ▲4.04
Posts /wp-admin/edit.php2,116 ▲162.14 ▲0.1533.85 ▼4.9832.68 ▼2.27
Add New Post /wp-admin/post-new.php1,544 ▲1323.25 ▲0.21615.05 ▼54.2288.09 ▲29.65
Media Library /wp-admin/upload.php1,416 ▲134.22 ▲0.12101.80 ▲2.9542.98 ▼1.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astronomy-picture-of-the-day/astronomy-picture-of-the-day-shortcodes.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/astronomy-picture-of-the-day/astronomy-picture-of-the-day-shortcodes.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
These attributes need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

astronomy-picture-of-the-day/astronomy-picture-of-the-day.php 92% from 13 tests

The main file in "Astronomy Picture Of the Day" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin328 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43938164
PHP53664107
Sass13024
CSS231119
Markdown16014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions5
▷ Named functions5100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 1.14MB with 0.66MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1,113.73KB335.35KB▼ 69.89%
images/gpl.png3.78KB2.57KB▼ 31.96%
images/astronomy_picture_of_the_day_logo.png53.69KB15.34KB▼ 71.43%