84% drafts

Code Review | Drafts

WordPress plugin Drafts scored84%from 54 tests.

About plugin

  • Plugin page: drafts
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 17, 2021
  • Latest release: Aug 20, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: bradparbs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,569 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Drafts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.94 ▼1.24
Dashboard /wp-admin3.31 ▲0.0145.94 ▼0.69
Posts /wp-admin/edit.php3.36 ▲0.0043.79 ▼0.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.63 ▼7.26
Media Library /wp-admin/upload.php3.23 ▲0.0035.18 ▲1.82

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Drafts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲9313.26 ▼1.331.87 ▼0.3543.31 ▼3.69
Dashboard /wp-admin2,273 ▲824.84 ▼0.08105.99 ▲1.8440.88 ▲2.30
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0933.90 ▼2.9333.90 ▼0.88
Add New Post /wp-admin/post-new.php1,536 ▼023.17 ▼0.01620.55 ▼55.6449.39 ▼4.59
Media Library /wp-admin/upload.php1,391 ▲34.27 ▲0.1095.75 ▼10.4840.74 ▼3.73

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Drafts\\add_action() in wp-content/plugins/drafts/drafts.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
5 plugin tags: posts, content, widget, calendar, dashboard

drafts/drafts.php 92% from 13 tests

The main file in "Drafts" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected64 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1163264

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin