83% lsw-organize-drafts

Code Review | Organize Drafts

WordPress plugin Organize Drafts scored83%from 54 tests.

About plugin

  • Plugin page: lsw-organize-drafts
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 29, 2016
  • Latest release: Feb 1, 2016
  • Number of updates: 10
  • Update frequency: every 0.3 days
  • Top authors: LinSoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.09MB] [CPU: ▼10.83ms] Passed 4 tests

Analyzing server-side resources used by Organize Drafts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.28 ▲2.26
Dashboard /wp-admin3.33 ▲0.0350.77 ▼2.19
Posts /wp-admin/edit.php3.39 ▲0.0350.18 ▼12.07
Add New Post /wp-admin/post-new.php5.47 ▼0.4277.98 ▼29.04
Media Library /wp-admin/upload.php3.26 ▲0.0340.54 ▼0.02
Draft Types /wp-admin/edit-tags.php?taxonomy=lswdrafttype3.3541.76
Draft Types /wp-admin/edit-tags.php?taxonomy=lswdrafttype&post_type=page3.2641.99

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
lsw_organize_drafts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Organize Drafts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.24 ▼0.131.56 ▼0.0543.16 ▲2.57
Dashboard /wp-admin2,203 ▲265.66 ▲0.0194.10 ▲9.2241.92 ▼1.98
Posts /wp-admin/edit.php2,108 ▲81.95 ▼0.0635.48 ▼6.9235.91 ▼2.93
Add New Post /wp-admin/post-new.php6,266 ▲4,73025.96 ▲7.71946.43 ▲294.7057.79 ▼16.23
Media Library /wp-admin/upload.php1,408 ▲84.12 ▼0.11102.11 ▼6.5145.36 ▼2.66
Draft Types /wp-admin/edit-tags.php?taxonomy=lswdrafttype1,5322.1228.2433.91
Draft Types /wp-admin/edit-tags.php?taxonomy=lswdrafttype&post_type=page1,5322.1227.5834.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • lsw_organize_drafts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/lsw-organize-drafts/lsw_organize_drafts.php:70

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 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Manage Draft Types through the Wordpress Admin sidebar.), #2 (View and Soft Drafts by Draft Types column.), #3 (Easily select the Draft Type from a dropdown menu.)
The official readme.txt is a good inspiration

lsw-organize-drafts/lsw_organize_drafts.php 77% from 13 tests

"Organize Drafts" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("lsw-organize-drafts.php" instead of "lsw_organize_drafts.php")

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
No dangerous file extensions were detected158 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14442158

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods16
▷ Static methods1275.00%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected