78% post-deadlines

Code Review | Post Deadlines

WordPress plugin Post Deadlines scored78%from 54 tests.

About plugin

  • Plugin page: post-deadlines
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 19, 2018
  • Latest release: Oct 20, 2018
  • Number of updates: 4
  • Update frequency: every 5.3 days
  • Top authors: deployer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /981 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.05MB] [CPU: ▼7.46ms] Passed 4 tests

Analyzing server-side resources used by Post Deadlines
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.92 ▼0.94
Dashboard /wp-admin3.37 ▲0.0251.80 ▼12.33
Posts /wp-admin/edit.php3.42 ▲0.0654.20 ▼0.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.34 ▼11.64
Media Library /wp-admin/upload.php3.29 ▲0.0634.88 ▼4.94

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Post Deadlines
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.64 ▼0.7111.33 ▲9.5641.21 ▼6.84
Dashboard /wp-admin2,195 ▲215.56 ▼0.1082.20 ▼23.0939.88 ▼4.00
Posts /wp-admin/edit.php2,114 ▲142.09 ▲0.0847.62 ▲10.8440.23 ▲4.01
Add New Post /wp-admin/post-new.php6,233 ▲4,70726.10 ▲2.56860.93 ▲142.7852.70 ▼11.21
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.00100.68 ▲4.7346.43 ▲1.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/post-deadlines/views/shortcode-list-upcoming-deadlines.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/post-deadlines/views/shortcode-list-upcoming-deadlines.php on line 4
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/post-deadlines/views/shortcode-list-upcoming-deadlines.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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: deadline, o2, p2, deadlines

post-deadlines/post-deadlines.php 92% from 13 tests

The entry point to "Post Deadlines" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin904 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS12434639
PHP357112237
JavaScript18728

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1270.59%
▷ Protected methods00.00%
▷ Private methods529.41%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
11 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%