84% documentcloud

Code Review | DocumentCloud

WordPress plugin DocumentCloud scored 84% from 54 tests.

About plugin

  • Plugin page: documentcloud
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: Apr 2, 2021
  • Number of updates: 21
  • Update frequency: every 103.1 days
  • Top authors: reefdog (80.95%)muckrock (23.81%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 11,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.26ms] Passed 4 tests

A check of server-side resources used by DocumentCloud
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0535.83 ▼3.45
Dashboard /wp-admin3.37 ▲0.0645.17 ▼10.76
Posts /wp-admin/edit.php3.48 ▲0.1350.36 ▲0.24
Add New Post /wp-admin/post-new.php5.95 ▲0.0698.90 ▲0.92
Media Library /wp-admin/upload.php3.29 ▲0.0637.28 ▲4.91
DocumentCloud /wp-admin/options-general.php?page=documentcloud3.2631.56

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for DocumentCloud
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.22 ▼1.534.69 ▲2.8438.07 ▼5.88
Dashboard /wp-admin2,213 ▲254.84 ▼0.05107.35 ▼1.2240.53 ▼2.93
Posts /wp-admin/edit.php2,093 ▲152.05 ▲0.0138.96 ▼0.8634.50 ▲0.22
Add New Post /wp-admin/post-new.php1,536 ▼023.10 ▼0.32613.92 ▼59.8954.22 ▲1.34
Media Library /wp-admin/upload.php1,395 ▲134.21 ▲0.0594.87 ▼3.7741.34 ▼2.88
DocumentCloud /wp-admin/options-general.php?page=documentcloud8152.0325.2328.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/documentcloud/documentcloud.php:50

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: reporting, journalism, documents, research, documentcloud

documentcloud/documentcloud.php Passed 13 tests

"DocumentCloud" version 0.5.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
51 characters long description:
Embed DocumentCloud resources in WordPress content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected328 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP156157233
Markdown150095

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin