67% digipass

Code Review | DigiPass

WordPress plugin DigiPass scored67%from 54 tests.

About plugin

  • Plugin page: digipass
  • Plugin version: 0.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Nov 10, 2015
  • Latest release: Feb 28, 2016
  • Number of updates: 9
  • Update frequency: every 12.2 days
  • Top authors: labs64 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,191 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼3.29ms] Passed 4 tests

This is a short check of server-side resources used by DigiPass
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3246.82 ▲0.14
Dashboard /wp-admin3.73 ▲0.4352.66 ▼7.97
Posts /wp-admin/edit.php3.79 ▲0.4350.29 ▼3.95
Add New Post /wp-admin/post-new.php6.33 ▲0.44102.45 ▼1.36
Media Library /wp-admin/upload.php3.66 ▲0.4339.11 ▲4.41
DigiPass /wp-admin/options-general.php?page=digipass3.6336.49

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 50 new files
Database: 3 new tables, 7 new options
New tables
wp_digipass_tokens
wp_digipass_connections
wp_digipass_validations
New WordPress options
widget_recent-comments
DIGIPASS_OPTIONS
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for DigiPass
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲9513.87 ▼0.509.13 ▲7.3046.49 ▲7.81
Dashboard /wp-admin2,201 ▲205.65 ▼0.1391.61 ▼8.9939.47 ▼1.47
Posts /wp-admin/edit.php2,106 ▲92.02 ▲0.0338.39 ▲1.5633.57 ▼1.48
Add New Post /wp-admin/post-new.php6,238 ▲4,71121.14 ▼1.89889.95 ▲169.0972.99 ▲24.07
Media Library /wp-admin/upload.php1,409 ▲64.33 ▲0.1199.05 ▼8.1243.16 ▲1.17
DigiPass /wp-admin/options-general.php?page=digipass9341.6622.5228.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_digipass_tokens
    • wp_digipass_validations
    • wp_digipass_connections
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/scripts/bump_major_version.php
    • > /wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/scripts/bump_patch_version.php
    • > /wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/scripts/v4_migration.php
    • > /wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/scripts/bump_minor_version.php
  • 102× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/progress_advanced.php on line 2
    • > PHP Warning
      require(wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/google_plus_profile.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/reddit_top_pics.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/twitter_trending_topics.php on line 2
    • > PHP Warning
      require(wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/flickr_upload_photo.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/instagram_search_photos.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'DIGIPASS_DIRincludes/netlicensing/Libraries/curl/curl.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/includes/netlicensing/netlicensing-load.php on line 3
    • > PHP Warning
      require(wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/progress.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/mailchimp_subscribe_email_address.php on line 2
    • > PHP Warning
      require(wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/digipass/vendor/php-curl-class/php-curl-class/examples/set_url_2.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === digipass === )
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (Protect post using DigiPass) image missing
Please take inspiration from this readme.txt

digipass/digipass.php Passed 13 tests

The main file in "DigiPass" v. 0.3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
67 characters long description:
The best way for publishers and bloggers to monetize their content.

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 detected10,741 lines of code in 119 files:
LanguageFilesBlank linesComment linesLines of code
PHP921,5471,6839,564
Bourne Shell64742285
Markdown4700284
JSON400199
make1306156
JavaScript414590
reStructuredText3444660
Python17217841
CSS28139
YAML14016
XML1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity14.49
▷ Minimum class complexity1.00
▷ Maximum class complexity83.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes39
▷ Abstract classes512.82%
▷ Concrete classes3487.18%
▷ Final classes00.00%
Methods541
▷ Static methods325.91%
▷ Public methods46585.95%
▷ Protected methods5710.54%
▷ Private methods193.51%
Functions212
▷ Named functions115.19%
▷ Anonymous functions20194.81%
Constants48
▷ Global constants3164.58%
▷ Class constants1735.42%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.61MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png125.17KB58.89KB▼ 52.95%
assets/icon-128x128.png0.50KB0.24KB▼ 52.16%
assets/banner-1544x500.png383.10KB166.50KB▼ 56.54%
admin/assets/img/digipass.png17.83KB0.49KB▼ 97.24%
assets/icon-256x256.png2.16KB1.47KB▼ 31.86%