84% share-drafts-publicly

Code Review | Share Drafts Publicly

WordPress plugin Share Drafts Publicly scored84%from 54 tests.

About plugin

  • Plugin page: share-drafts-publ...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.1
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: Sep 18, 2017
  • Number of updates: 12
  • Update frequency: every 133.0 days
  • Top authors: travislopes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /13,863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.71ms] Passed 4 tests

A check of server-side resources used by Share Drafts Publicly
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0436.47 ▼4.46
Dashboard /wp-admin3.35 ▲0.0541.10 ▼18.14
Posts /wp-admin/edit.php3.40 ▲0.0446.07 ▼2.72
Add New Post /wp-admin/post-new.php6.10 ▲0.2169.43 ▼13.52
Media Library /wp-admin/upload.php3.27 ▲0.0435.49 ▲1.17

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Share Drafts Publicly
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.491.72 ▼0.2638.01 ▼8.59
Dashboard /wp-admin2,206 ▲325.85 ▼0.05110.27 ▼7.5943.96 ▲0.09
Posts /wp-admin/edit.php2,092 ▲62.02 ▼0.0340.66 ▲5.2035.21 ▲1.11
Add New Post /wp-admin/post-new.php6,238 ▲4,71918.99 ▼4.33888.57 ▲189.1955.16 ▼2.00
Media Library /wp-admin/upload.php1,388 ▼04.14 ▼0.09132.35 ▲35.1953.91 ▲10.79

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
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/share-drafts-publicly/share-drafts-publicly.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: post, share, draft, admin, public

share-drafts-publicly/share-drafts-publicly.php 85% from 13 tests

This is the main PHP file of "Share Drafts Publicly" version 1.1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin186 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP183181132
JavaScript1271348
CSS1106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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 are no PNG files in this plugin