84% curiosity-potd

Code Review | Curiosity POTD

WordPress plugin Curiosity POTD scored 84% from 54 tests.

About plugin

  • Plugin page: curiosity-potd
  • Plugin version: 1.1.0
  • PHP compatiblity: 4.4.45+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Jan 28, 2019
  • Latest release: May 25, 2021
  • Number of updates: 9
  • Update frequency: every 94.7 days
  • Top authors: andreabenzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 673 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼138.60ms] Passed 4 tests

Server-side resources used by Curiosity POTD
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1237.04 ▲15.06
Dashboard /wp-admin3.07 ▲0.0142.93 ▼0.23
Posts /wp-admin/edit.php3.12 ▲0.0143.41 ▲0.14
Add New Post /wp-admin/post-new.php5.42 ▼0.0186.85 ▼558.01
Media Library /wp-admin/upload.php3.01 ▲0.0132.35 ▲3.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Curiosity POTD
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.82 ▲0.2311.92 ▼2.7848.23 ▲0.20
Dashboard /wp-admin2,970 ▲365.86 ▼0.29155.50 ▲8.70109.38 ▼1.22
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0170.31 ▲4.4584.67 ▼1.60
Add New Post /wp-admin/post-new.php1,672 ▲7818.84 ▲0.09401.59 ▲7.74105.60 ▼4.25
Media Library /wp-admin/upload.php1,822 ▲125.00 ▼0.04154.29 ▲5.46114.95 ▲2.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_curiosity_potd

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/curiosity-potd/curiosity-potd.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: mars, nasa, astronomy, photo, widget

curiosity-potd/curiosity-potd.php Passed 13 tests

The main PHP script in "Curiosity POTD" version 1.1.0 is automatically included on every request by WordPress
47 characters long description:
NASA Curiosity rover picture of the day widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin