84% wordcamp-ann-arbor-badges

Code Review | WordCamp Ann Arbor Badges

WordPress plugin WordCamp Ann Arbor Badges scored84%from 54 tests.

About plugin

  • Plugin page: wordcamp-ann-arbo...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Aug 20, 2014
  • Latest release: Aug 28, 2014
  • Number of updates: 11
  • Update frequency: every 0.8 days
  • Top authors: topher1kenobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.52ms] Passed 4 tests

Analyzing server-side resources used by WordCamp Ann Arbor Badges
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.43 ▼3.28
Dashboard /wp-admin3.33 ▲0.0343.97 ▼5.88
Posts /wp-admin/edit.php3.38 ▲0.0248.41 ▼1.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.49 ▼17.90
Media Library /wp-admin/upload.php3.25 ▲0.0233.89 ▼3.00

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_annarbor_badge_widget
widget_recent-comments

Browser metrics Passed 4 tests

WordCamp Ann Arbor Badges: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▲0.001.85 ▲0.2840.73 ▲4.25
Dashboard /wp-admin2,192 ▲155.53 ▼0.1484.87 ▼14.7137.53 ▼5.09
Posts /wp-admin/edit.php2,100 ▲31.99 ▼0.0135.08 ▼0.9334.31 ▼1.44
Add New Post /wp-admin/post-new.php1,528 ▼023.23 ▲0.27669.90 ▼8.5260.89 ▲5.55
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.12106.59 ▼6.5946.77 ▼0.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_annarbor_badge_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wordcamp-ann-arbor-badges/wordcamp-ann-arbor.php:17

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: widget, wordcamp

wordcamp-ann-arbor-badges/wordcamp-ann-arbor.php 85% from 13 tests

The primary PHP file in "WordCamp Ann Arbor Badges" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wordcamp-ann-arbor-badges.php" instead of "wordcamp-ann-arbor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1294883
CSS1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.33MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/attendee_large_badge.png86.41KB32.58KB▼ 62.30%
images/volunteer_small_badge.png5.36KB5.23KB▼ 2.50%
images/sponsor_small_badge.png18.07KB8.17KB▼ 54.76%
images/volunteer_large_badge.png18.12KB8.13KB▼ 55.14%
images/sponsor_large_badge.png86.41KB32.92KB▼ 61.90%