68% djd-site-post

Code Review | DJD Site Post

WordPress plugin DJD Site Post scored68%from 54 tests.

About plugin

  • Plugin page: djd-site-post
  • Plugin version: 0.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.6.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2013
  • Latest release: Feb 24, 2014
  • Number of updates: 34
  • Update frequency: every 9.5 days
  • Top authors: djarzyna (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

300+ active /25,441 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.58MB] [CPU: ▼42.85ms] Passed 4 tests

Server-side resources used by DJD Site Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.41 ▼1.0510.35 ▼27.54
Dashboard /wp-admin2.43 ▼0.8817.40 ▼30.13
Posts /wp-admin/edit.php2.43 ▼0.9312.22 ▼39.71
Add New Post /wp-admin/post-new.php2.43 ▼3.4613.89 ▼74.02
Media Library /wp-admin/upload.php2.43 ▼0.8011.97 ▼21.58
DJD Site Post /wp-admin/options-general.php?page=djd-site-post-settings2.4313.02

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_djd_site_post_widget
djd_site_post_settings

Browser metrics Passed 4 tests

This is an overview of browser requirements for DJD Site Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,636 ▼11013.23 ▼1.141.72 ▲0.1042.47 ▲2.40
Dashboard /wp-admin2,210 ▲254.87 ▼0.02109.01 ▲6.0440.58 ▼4.20
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0439.37 ▼2.8534.97 ▼1.39
Add New Post /wp-admin/post-new.php1,536 ▲1623.14 ▼0.04652.30 ▼26.3259.15 ▲5.28
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.03104.12 ▲3.5346.12 ▲0.06
DJD Site Post /wp-admin/options-general.php?page=djd-site-post-settings1,2572.0327.2332.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/djd-site-post/inc/djdsp-widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; DJD_Site_Post_Widget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_djd_site_post_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=djd-site-post-settings
    • > Deprecated in wp-content/plugins/djd-site-post/inc/djdsp-widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; DJD_Site_Post_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=djd-site-post-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in DJD_Site_Post_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=djd-site-post-settings
    • > Notice in wp-content/plugins/djd-site-post/views/admin.php+126
    Undefined index: djd-edit-page
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=djd-site-post-settings
    • > Notice in wp-content/plugins/djd-site-post/views/admin.php+291
    Undefined index: djd-post-format-default
    • > GET request to /wp-admin/options-general.php?page=djd-site-post-settings
    • > Notice in wp-content/plugins/djd-site-post/views/admin.php+368
    Undefined index: djd-quiz

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
Please fix the following items
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/djd-site-post/djd-site-post.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_section() in wp-content/plugins/djd-site-post/views/admin.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/djd-site-post/views/display.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/djd-site-post/inc/djdsp-widget.php:9
    • > PHP Notice
      Undefined variable: djd_options in wp-content/plugins/djd-site-post/views/display.php on line 14
    • > PHP Notice
      Undefined variable: called_from_widget in wp-content/plugins/djd-site-post/views/display.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/djd-site-post/views/display.php:75
    • > PHP Notice
      Undefined index: form_ok in wp-content/plugins/djd-site-post/views/display.php on line 68

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === djd-site-post === )
You can look at the official readme.txt

djd-site-post/djd-site-post.php Passed 13 tests

Analyzing the main PHP file in "DJD Site Post" version 0.9.3
46 characters long description:
Write, publish and edit posts on the front end

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,611 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP6161239969
CSS2645334
PO File1125153246
JavaScript411262

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.32
Average class complexity36.00
▷ Minimum class complexity7.00
▷ Maximum class complexity65.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/accepted_48.png5.13KB1.89KB▼ 63.13%
img/cancel_48.png5.19KB1.92KB▼ 63.09%
views/images/djd-grey34x34.png1.17KB1.44KB0.00%