84% wp-post-of-the-day

Code Review | WP Post of the Day

WordPress plugin WP Post of the Day scored84%from 54 tests.

About plugin

  • Plugin page: wp-post-of-the-day
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7
  • WordPress version: 6.3.1
  • First release: May 14, 2019
  • Latest release: Apr 29, 2021
  • Number of updates: 6
  • Update frequency: every 119.3 days
  • Top authors: wpscholar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /1,347 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP Post of the Day
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.78 ▼9.93
Dashboard /wp-admin3.31 ▲0.0148.33 ▼4.45
Posts /wp-admin/edit.php3.42 ▲0.0748.99 ▲0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.42 ▼4.60
Media Library /wp-admin/upload.php3.23 ▲0.0038.32 ▲3.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Post of the Day
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.64 ▼0.744.37 ▲2.5942.45 ▼2.40
Dashboard /wp-admin2,209 ▲215.89 ▲0.00104.79 ▲0.5539.78 ▲1.24
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0637.35 ▲1.9734.11 ▼0.26
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.30680.57 ▲36.8560.14 ▲0.32
Media Library /wp-admin/upload.php1,388 ▲34.16 ▼0.04112.41 ▲8.4248.24 ▲2.08

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-post-of-the-day/wp-post-of-the-day.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

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
4 plugin tags: post rotation, post of the day, daily post, different post

wp-post-of-the-day/wp-post-of-the-day.php Passed 13 tests

"WP Post of the Day" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
30 characters long description:
Displays a new post every day.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin317 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP175137273
CSS18244

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity45.00
▷ Minimum class complexity45.00
▷ Maximum class complexity45.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin