84% drafty-in-here

Code Review | Drafty In Here

WordPress plugin Drafty In Here scored84%from 54 tests.

About plugin

  • Plugin page: drafty-in-here
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Mar 5, 2016
  • Latest release: Jul 31, 2016
  • Number of updates: 14
  • Update frequency: every 11.9 days
  • Top authors: AronMS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /955 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.03MB] [CPU: ▼8.34ms] Passed 4 tests

An overview of server-side resources used by Drafty In Here
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0332.68 ▼13.39
Dashboard /wp-admin3.33 ▲0.0345.78 ▼4.65
Posts /wp-admin/edit.php3.45 ▲0.0948.00 ▲3.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.77 ▼15.37
Media Library /wp-admin/upload.php3.25 ▲0.0333.51 ▲0.07
Drafty In Here /wp-admin/options-general.php?page=drafty-in-here3.2532.21

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Drafty In Here
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.63 ▼1.021.81 ▼0.2941.48 ▼9.47
Dashboard /wp-admin2,210 ▲255.89 ▲0.99105.14 ▼10.6540.67 ▼4.06
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.2040.71 ▲1.5235.18 ▲2.48
Add New Post /wp-admin/post-new.php1,537 ▼523.31 ▲4.86647.51 ▲17.8947.64 ▼4.50
Media Library /wp-admin/upload.php1,395 ▲134.17 ▼0.0197.20 ▼1.3341.82 ▼2.91
Drafty In Here /wp-admin/options-general.php?page=drafty-in-here8392.0326.5726.81

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • drafty_options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Drafty\\Repositories\\Email\\EmailInterface' not found in wp-content/plugins/drafty-in-here/Repositories/Email/Email.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Drafty\\Repositories\\Scheduler\\SchedulerInterface' not found in wp-content/plugins/drafty-in-here/Repositories/Scheduler/Scheduler.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Drafty\\Repositories\\Options\\OptionsInterface' not found in wp-content/plugins/drafty-in-here/Repositories/Options/Options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Drafty_In_Here' not found in wp-content/plugins/drafty-in-here/Repositories/Admin/Admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/drafty-in-here/partials/partial-admin-interface.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (The Drafty In Here settings screen is located under the main WordPress settings menu.) image required
Please take inspiration from this readme.txt

drafty-in-here/drafty-in-here.php Passed 13 tests

The main file in "Drafty In Here" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
94 characters long description:
Get email notifications of draft posts sitting in your WordPress Blog waiting to be published.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin838 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17191359773
Markdown226064
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.27
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces4
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods68
▷ Static methods3247.06%
▷ Public methods6392.65%
▷ Protected methods00.00%
▷ Private methods57.35%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.51KB25.95KB▼ 54.87%