78% diarypress

Code Review | DiaryPress

WordPress plugin DiaryPress scored78%from 54 tests.

About plugin

  • Plugin page: diarypress
  • Plugin version: 5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2009
  • Latest release: Oct 1, 2023
  • Number of updates: 65
  • Update frequency: every 79.4 days
  • Top authors: tomhowson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,999 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
This plugin's installer ran successfully

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

Server-side resources used by DiaryPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.49 ▼2.68
Dashboard /wp-admin3.33 ▲0.0247.98 ▼4.65
Posts /wp-admin/edit.php3.38 ▲0.0249.47 ▼1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.98 ▼30.43
Media Library /wp-admin/upload.php3.25 ▲0.0235.93 ▼3.81
DiaryPress /wp-admin/options-general.php?page=diarypress-setting-admin3.1933.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by DiaryPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.40 ▲0.031.75 ▼0.1542.10 ▼3.31
Dashboard /wp-admin2,202 ▲255.66 ▼0.0389.25 ▼9.7138.52 ▼6.44
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0040.30 ▲4.1435.34 ▲1.13
Add New Post /wp-admin/post-new.php1,551 ▲2523.19 ▲5.52659.51 ▼47.0958.62 ▲3.69
Media Library /wp-admin/upload.php1,401 ▲14.23 ▲0.02102.40 ▼13.5544.51 ▼5.23
DiaryPress /wp-admin/options-general.php?page=diarypress-setting-admin8312.0223.0227.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=diarypress-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=diarypress-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/diarypress/diarypress.php:15

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: rss, force login, login, diary, private...

diarypress/diarypress.php 92% from 13 tests

The main PHP script in "DiaryPress" version 5.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 315 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin190 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17862190

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin