83% badgeos-nomination-submission-add-on

Code Review | BadgeOS Submissions & Nominations

WordPress plugin BadgeOS Submissions & Nominations scored 83% from 54 tests.

About plugin

  • Plugin page: badgeos-nominatio...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Aug 5, 2020
  • Latest release: Jun 22, 2022
  • Number of updates: 18
  • Update frequency: every 38.4 days
  • Top authors: learningtimes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,597 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.11ms] Passed 4 tests

This is a short check of server-side resources used by BadgeOS Submissions & Nominations
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.63 ▼4.38
Dashboard /wp-admin3.31 ▲0.0142.25 ▼4.74
Posts /wp-admin/edit.php3.36 ▲0.0043.83 ▼3.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.70 ▼20.23
Media Library /wp-admin/upload.php3.23 ▲0.0037.40 ▲4.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 66 new files
Database: no new tables, 8 new options
New WordPress options
badgeos_admin_tools
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
badgeos_settings

Browser metrics Passed 4 tests

Checking browser requirements for BadgeOS Submissions & Nominations
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.24 ▼1.021.59 ▼0.6141.43 ▼13.59
Dashboard /wp-admin2,209 ▲215.88 ▼0.0098.59 ▼20.8441.85 ▼7.59
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0536.25 ▼6.7332.84 ▼4.32
Add New Post /wp-admin/post-new.php1,533 ▲222.98 ▼0.09628.78 ▲3.7774.89 ▲12.35
Media Library /wp-admin/upload.php1,391 ▲124.20 ▲0.01117.78 ▼9.3857.13 ▼43.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • badgeos_settings
    • can_compress_scripts
    • widget_theysaidso_widget
    • badgeos_admin_tools
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/shortcodes/badgeos_nomination.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/integrations.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/shortcodes/badgeos_nominations.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/metaboxes.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/submission-actions.php:129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/shortcodes/badgeos_submission.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/functions.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/badgeos-nomination-submission-email-tool.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/shortcodes/badgeos_submissions.php:76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/badgeos-nomination-submission-add-on/includes/post_types.php:94

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

badgeos-nomination-submission-add-on/badgeos-nomination-submission-addon.php 85% from 13 tests

The entry point to "BadgeOS Submissions & Nominations" version 1.2.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("badgeos-nomination-submission-add-on.php" instead of "badgeos-nomination-submission-addon.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin12,954 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JSON3008,689
PHP148559873,023
JavaScript9160537785
CSS633101288
Sass5211124
Markdown317045

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity34.00
▷ Minimum class complexity29.00
▷ Maximum class complexity39.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods19
▷ Static methods315.79%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions82
▷ Named functions82100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-7.png52.52KB18.59KB▼ 64.60%
assets/screenshot-6.png10.28KB5.00KB▼ 51.37%
assets/screenshot-15.png11.62KB4.91KB▼ 57.79%
assets/screenshot-9.png12.30KB5.61KB▼ 54.39%
assets/screenshot-14.png13.20KB5.64KB▼ 57.26%