10% accredible-certificates

Code Review | Accredible Certificates & Open Badges

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

About plugin

  • Plugin page: accredible-certif...
  • Plugin version: 1.4.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Nov 20, 2014
  • Latest release: Jul 13, 2022
  • Number of updates: 70
  • Update frequency: every 39.9 days
  • Top authors: accredible (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /13,374 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.23MB] [CPU: ▲1.17ms] 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.70 ▲0.2341.51 ▲0.93
Dashboard /wp-admin3.58 ▲0.2751.23 ▲2.21
Posts /wp-admin/edit.php3.63 ▲0.2746.13 ▲4.81
Add New Post /wp-admin/post-new.php6.10 ▲0.2084.27 ▼2.35
Media Library /wp-admin/upload.php3.44 ▲0.2036.61 ▲3.87
Accredible Certificates /wp-admin/options-general.php?page=accredible_certificates3.4032.30

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, 9 new options
New tables
wp_accredible_mapping
New WordPress options
widget_recent-comments
automatically_issue_certificates
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_accredible_widget
accredible_db_version
db_upgraded

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 /2,807 ▲4614.17 ▼0.211.69 ▼0.0743.12 ▼1.23
Dashboard /wp-admin2,213 ▲335.48 ▼0.1881.65 ▼17.6039.93 ▼1.65
Posts /wp-admin/edit.php2,118 ▲181.98 ▼0.0435.48 ▼2.1333.36 ▲2.75
Add New Post /wp-admin/post-new.php1,541 ▲1523.29 ▲0.08604.74 ▼45.3149.01 ▼3.39
Media Library /wp-admin/upload.php1,415 ▲124.22 ▲0.0392.09 ▼6.2643.93 ▲1.44
Accredible Certificates /wp-admin/options-general.php?page=accredible_certificates8032.0222.7327.40

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 9 options in the database
    • accredible_db_version
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • automatically_issue_certificates
    • 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: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/tests/NullStreamTest.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Event\\SubscriberInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Subscriber/Mock.php:16
    • > 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\\BadResponseException' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Post\\PostFileInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Post/PostFile.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\ParseException' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Exception/XmlParseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Post\\PostBodyInterface' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Post/PostBody.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Event\\AbstractRequestEvent' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Event/ProgressEvent.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/accredible-certificates/vendor/guzzlehttp/streams/tests/FnStreamTest.php:10

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.8'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,628 lines of code in 217 files:
LanguageFilesBlank linesComment linesLines of code
PHP17828,27714,86639,366
Markdown878602,774
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.37
▷ 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.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png67.15KB20.92KB▼ 68.84%
screenshot-1.png290.17KB98.49KB▼ 66.06%
screenshot-3.png44.60KB13.86KB▼ 68.91%
assets/icon-128x128.png3.87KB2.60KB▼ 32.78%
assets/screenshot-2.png41.34KB16.08KB▼ 61.11%