84% dropit

Code Review | Drop it

WordPress plugin Drop it scored84%from 54 tests.

About plugin

  • Plugin page: dropit
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9
  • WordPress version: 6.3.1
  • First release: Apr 28, 2018
  • Latest release: Aug 9, 2018
  • Number of updates: 13
  • Update frequency: every 8.6 days
  • Top authors: youknowriad (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,801 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.01MB] [CPU: ▲0.65ms] Passed 4 tests

Server-side resources used by Drop it
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0148.60 ▲11.30
Dashboard /wp-admin3.31 ▲0.0147.71 ▼2.06
Posts /wp-admin/edit.php3.36 ▲0.0146.44 ▲1.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.40 ▲3.59
Media Library /wp-admin/upload.php3.23 ▲0.0134.09 ▼0.38

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Drop it
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.71 ▲0.0944.68 ▲3.39
Dashboard /wp-admin2,198 ▲215.59 ▼0.0193.64 ▼14.5738.46 ▼2.26
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0739.47 ▲2.0135.54 ▼4.35
Add New Post /wp-admin/post-new.php1,560 ▲2618.87 ▲0.71676.37 ▲56.9738.78 ▼24.67
Media Library /wp-admin/upload.php1,400 ▲64.27 ▼0.0294.64 ▼3.3744.75 ▼0.45

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropit/lib/i18n-script.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropit/lib/sidebar-script.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dropit/languages/dropit-translations.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dropit/lib/i18n-script.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: gutenberg, media, unsplash, dropit

dropit/dropit.php Passed 13 tests

Analyzing the main PHP file in "Drop it" version 1.3.1
88 characters long description:
Easily insert free photos from unsplash.com or giphy.com right from Gutenberg's sidebar.

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
No dangerous file extensions were detected87 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5226381
CSS1003
JavaScript20103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
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%
Functions7
▷ Named functions7100.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