10% accredible-certificates

Code Review | Accredible Certificates & Open Badges

WordPress plugin Accredible Certificates & Open Badges scored 10% from 54 tests.

About plugin

  • Plugin page: accredible-certif...
  • Plugin version: 1.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.2
  • WordPress version: 5.8.1
  • First release: Nov 20, 2014
  • Latest release: Sep 7, 2021
  • Number of updates: 64
  • Update frequency: every 38.8 days
  • Top authors: accredible (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 8,792 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/accredible-certificates/accredible_certificates.php+126
    Undefined variable: accredible_db_version

Server metrics [RAM: ▲0.21MB] [CPU: ▼143.09ms] Passed 4 tests

An overview of server-side resources used by Accredible Certificates & Open Badges
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.1940.20 ▲7.52
Dashboard /wp-admin3.32 ▲0.2745.63 ▼1.66
Posts /wp-admin/edit.php3.37 ▲0.2647.15 ▼1.73
Add New Post /wp-admin/post-new.php5.62 ▲0.1994.24 ▼566.03
Media Library /wp-admin/upload.php3.20 ▲0.2037.56 ▼2.92
Accredible Certificates /wp-admin/options-general.php?page=accredible_certificates3.1733.76

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 250 new files
Database: 1 new table, 3 new options
New tables
wp_accredible_mapping
New WordPress options
automatically_issue_certificates
accredible_db_version
widget_accredible_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accredible Certificates & Open Badges
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲10616.11 ▲0.586.90 ▼1.6345.03 ▼3.95
Dashboard /wp-admin2,995 ▲585.87 ▼0.23141.07 ▼2.38115.77 ▲0.60
Posts /wp-admin/edit.php2,761 ▲222.69 ▼0.0166.87 ▼0.5588.34 ▼6.99
Add New Post /wp-admin/post-new.php1,515 ▼35718.58 ▼0.52368.25 ▲4.44112.39 ▼4.71
Media Library /wp-admin/upload.php1,829 ▲225.00 ▼0.01161.86 ▲5.20123.13 ▼6.21
Accredible Certificates /wp-admin/options-general.php?page=accredible_certificates1,0532.0958.2784.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_accredible_mapping
  • This plugin did not uninstall successfully, leaving 3 options in the database
    • automatically_issue_certificates
    • accredible_db_version
    • widget_accredible_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 115× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Message\\MessageInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Exception/ParseException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/tests/StreamDecoratorTraitTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Ring\\Future\\FutureArrayInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/ringphp/src/Future/FutureArray.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/src/AsyncReadStream.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Promise\\PromiseInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/tests/Exception/SeekExceptionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/src/NullStream.php:8

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)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #7 (Shortcode output.), #8 (Widget output.)
  • Tags: You are using too many tags: 17 tag instead of maximum 10
You can take inspiration from this readme.txt

accredible-certificates/accredible_certificates.php 92% from 13 tests

"Accredible Certificates & Open Badges" version 1.4.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("accredible-certificates.php" instead of "accredible_certificates.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected43,622 lines of code in 217 files:
LanguageFilesBlank linesComment linesLines of code
PHP17828,27714,86639,362
Markdown878502,772
reStructuredText9263333517
JSON700443
make4455178
JavaScript11860163
YAML5262124
XML31338
Python14019
CSS1116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.36
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces25
Interfaces23
Traits6
Classes140
▷ Abstract classes42.86%
▷ Concrete classes13697.14%
▷ Final classes32.21%
Methods1,241
▷ Static methods1189.51%
▷ Public methods1,12990.98%
▷ Protected methods201.61%
▷ Private methods927.41%
Functions155
▷ Named functions149.03%
▷ Anonymous functions14190.97%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
14 PNG files occupy 3.61MB with 2.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png611.35KB223.16KB▼ 63.50%
screenshot-3.png44.60KB13.86KB▼ 68.91%
assets/icon-128x128.png3.87KB2.60KB▼ 32.78%
assets/banner-772x250.png120.91KB48.85KB▼ 59.60%
assets/banner-1800x690.png559.90KB242.59KB▼ 56.67%