10% wordcamp-belo-horizonte-badges

Code Review | WordCamp Belo Horizonte Badges

WordPress plugin WordCamp Belo Horizonte Badges scored10%from 54 tests.

About plugin

  • Plugin page: wordcamp-belo-hor...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2015
  • Latest release: Apr 7, 2015
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: valeriosza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /614 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/widget-wordcamp_belohorizonte_badge.php+310
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.87ms] Passed 4 tests

This is a short check of server-side resources used by WordCamp Belo Horizonte Badges
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.57 ▼35.52
Dashboard /wp-admin2.05 ▼1.265.75 ▼45.24
Posts /wp-admin/edit.php2.05 ▼1.315.47 ▼44.26
Add New Post /wp-admin/post-new.php2.05 ▼3.845.30 ▼90.44
Media Library /wp-admin/upload.php2.05 ▼1.184.80 ▼34.92

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_wordcamp_belohorizonte_badge-id
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

WordCamp Belo Horizonte Badges: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.90 ▲0.1640.86 ▼3.45
Dashboard /wp-admin2,192 ▲155.55 ▼0.0786.86 ▼0.5336.34 ▼8.55
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0040.26 ▲3.3335.82 ▼1.74
Add New Post /wp-admin/post-new.php1,586 ▲5823.03 ▼0.02672.48 ▼12.7054.61 ▲0.28
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.12102.86 ▼11.1643.78 ▼3.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/widget-wordcamp_belohorizonte_badge.php+310
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_wordcamp_belohorizonte_badge-id
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wordcamp-belo-horizonte-badges/includes/field-dropdown.php
    • > /wp-content/plugins/wordcamp-belo-horizonte-badges/includes/element-wordcamp_belohorizonte_badge.php
  • 21× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/element-wordcamp_belohorizonte_badge.php on line 4
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/wordcamp-belo-horizonte-badges/configs/fieldgroups-wordcamp_belohorizonte_badge.php:15
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/wordcamp-belo-horizonte-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-belo-horizonte-badges/includes/field-dropdown.php on line 21
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/field-dropdown.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wordcamp-belo-horizonte-badges/configs/wordcamp_belohorizonte_badge-settings.php:15
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/field-dropdown.php on line 20
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/field-dropdown.php on line 32
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/element-wordcamp_belohorizonte_badge.php on line 3
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/wordcamp-belo-horizonte-badges/includes/field-dropdown.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: wordcamp, 2015, belohorizonte, shortcode, badges...

wordcamp-belo-horizonte-badges/wordcamp-belo-horizonte-badges.php 92% from 13 tests

The main file in "WordCamp Belo Horizonte Badges" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected1,716 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9196365880
CSS3218547
JavaScript32110175
PO File23961114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity73.00
▷ Minimum class complexity41.00
▷ Maximum class complexity105.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1027.78%
▷ Public methods3288.89%
▷ Protected methods00.00%
▷ Private methods411.11%
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

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/white.png0.62KB0.79KB0.00%
assets/images/icon.png0.74KB0.81KB0.00%