10% wordcamp-miami-badges

Code Review | Wordcamp Miami Badges

WordPress plugin Wordcamp Miami Badges scored10%from 54 tests.

About plugin

  • Plugin page: wordcamp-miami-ba...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.9
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: May 1, 2014
  • Number of updates: 17
  • Update frequency: every 0.1 days
  • Top authors: tripflex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /771 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wordcamp-miami-badges/includes/widget-wordcamp_miami_badge.php+313
    Function create_function() is deprecated

Server metrics [RAM: ▼1.73MB] [CPU: ▼49.40ms] Passed 4 tests

An overview of server-side resources used by Wordcamp Miami Badges
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.215.77 ▼31.89
Dashboard /wp-admin2.28 ▼1.037.78 ▼40.30
Posts /wp-admin/edit.php2.28 ▼1.086.84 ▼42.15
Add New Post /wp-admin/post-new.php2.28 ▼3.617.16 ▼83.27
Media Library /wp-admin/upload.php2.28 ▼0.956.16 ▼27.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Wordcamp Miami Badges
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.83 ▲0.161.87 ▲0.1243.53 ▼1.61
Dashboard /wp-admin2,206 ▲145.91 ▲0.81104.88 ▼0.3441.60 ▲0.63
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0635.21 ▼4.2934.26 ▲0.88
Add New Post /wp-admin/post-new.php1,574 ▲4623.28 ▲4.83670.60 ▲68.1653.51 ▼2.01
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.1396.24 ▼1.1041.55 ▲0.05

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wordcamp-miami-badges/includes/widget-wordcamp_miami_badge.php+313
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_wordcamp_miami_badge-id

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wordcamp-miami-badges/includes/element-wordcamp_miami_badge.php
    • > /wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 32
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 21
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wordcamp-miami-badges/includes/element-wordcamp_miami_badge.php on line 3
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wordcamp-miami-badges/includes/element-wordcamp_miami_badge.php on line 3
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wordcamp-miami-badges/configs/fieldgroups-wordcamp_miami_badge.php:15
    • > PHP Notice
      Undefined variable: id in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 20
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/wordcamp-miami-badges/includes/field-dropdown.php on line 25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wordcamp-miami-badges/includes/element-wordcamp_miami_badge.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: 2014, wordcamp, widget, shortcode, miami...

wordcamp-miami-badges/plugincore.php 85% from 13 tests

"Wordcamp Miami Badges" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wordcamp-miami-badges.php" instead of "plugincore.php")
  • Domain Path: The domain path points to an invalid folder, "/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,657 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9194355872
CSS3218547
JavaScript32110175
Markdown124048
PO File10015

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity72.50
▷ Minimum class complexity41.00
▷ Maximum class complexity104.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1028.57%
▷ Public methods3188.57%
▷ Protected methods00.00%
▷ Private methods411.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png0.74KB0.81KB0.00%
assets/images/white.png0.62KB0.79KB0.00%