78% simple-diary

Code Review | Simple Diary for Wordpress

WordPress plugin Simple Diary for Wordpress scored 78% from 54 tests.

About plugin

  • Plugin page: simple-diary
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Oct 24, 2019
  • Number of updates: 65
  • Update frequency: every 30.3 days
  • Top authors: jojaba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.09ms] Passed 4 tests

Server-side resources used by Simple Diary for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.01 ▼5.53
Dashboard /wp-admin3.36 ▲0.0644.59 ▼2.41
Posts /wp-admin/edit.php3.42 ▲0.0645.97 ▼2.25
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.16 ▼2.16
Media Library /wp-admin/upload.php3.28 ▲0.0634.40 ▲0.10
New /wp-admin/post-new.php?post_type=reminder3.3653.27
All reminders /wp-admin/edit.php?post_type=reminder3.2931.35
Simple Diary /wp-admin/options-general.php?page=simdiaw_options_page3.2529.71
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=reminder3.2833.22

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 168 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_simdiaw_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Diary for Wordpress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.28 ▼1.511.67 ▼0.2141.69 ▼2.85
Dashboard /wp-admin2,238 ▲505.85 ▼0.03103.95 ▲1.7238.40 ▼2.07
Posts /wp-admin/edit.php2,129 ▲372.02 ▲0.0136.61 ▼3.8931.60 ▼5.18
Add New Post /wp-admin/post-new.php1,545 ▲823.43 ▲0.12679.69 ▲13.2557.43 ▼1.05
Media Library /wp-admin/upload.php1,417 ▲294.18 ▼0.0198.66 ▼2.1343.37 ▼2.92
New /wp-admin/post-new.php?post_type=reminder2,8893.3377.8985.79
All reminders /wp-admin/edit.php?post_type=reminder1,1711.9833.0828.17
Simple Diary /wp-admin/options-general.php?page=simdiaw_options_page1,3131.6921.9536.14
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=reminder1,3412.1426.9929.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_simdiaw_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=reminder
    • > Notice in wp-content/plugins/simple-diary/simple-diary.php+109
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-diary/simdiaw-options.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-diary/simdiaw-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/simple-diary/themes-support/twentytwelve/content-reminder.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/simple-diary/themes-support/twentyten/loop-reminder.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-diary/themes-support/twentyfourteen/archive-reminder.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/simple-diary/themes-support/twentyeleven/content-reminder.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-diary/themes-support/twentyten/archive-reminder.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-diary/themes-support/twentythirteen/single-reminder.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-diary/simdiaw-template-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/simple-diary/themes-support/twentythirteen/archive-reminder.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: custom post type, reminders, diary

simple-diary/simple-diary.php 92% from 13 tests

"Simple Diary for Wordpress" version 1.4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin9,087 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1019728642,973
HTML4879121,868
PHP203774291,678
CSS15252151,029
LESS11274273572
PO File1131161436
Markdown61940335
JSON400191
YAML1105

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ 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%
Functions72
▷ Named functions72100.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