10% concertpress

Code Review | ConcertPress

WordPress plugin ConcertPress scored 10% from 54 tests.

About plugin

  • Plugin page: concertpress
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-3.4.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2012
  • Latest release: Oct 22, 2012
  • Number of updates: 16
  • Update frequency: every 4.3 days
  • Top authors: theorboman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,881 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
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.69ms] Passed 4 tests

This is a short check of server-side resources used by ConcertPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.93 ▼4.43
Dashboard /wp-admin3.36 ▲0.0646.86 ▼4.49
Posts /wp-admin/edit.php3.41 ▲0.0650.45 ▲6.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0688.10 ▼15.30
Media Library /wp-admin/upload.php3.28 ▲0.0638.93 ▲1.48
ConcertPress /wp-admin/admin.php?page=concertpress/concertpress.php3.2931.17
Events /wp-admin/admin.php?page=events3.2932.52
Programmes /wp-admin/admin.php?page=programmes3.3332.43
Archives /wp-admin/admin.php?page=archives3.2630.48
Venues /wp-admin/admin.php?page=venues3.3032.10

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: 3 new tables, 8 new options
New tables
wp_concertpress_venues
wp_concertpress_events
wp_concertpress_programmes
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
rps_cp_num_results
widget_theysaidso_widget
widget_concertpress_id
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for ConcertPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲13313.23 ▼1.081.90 ▲0.0739.07 ▼9.06
Dashboard /wp-admin2,241 ▲505.84 ▼0.0198.43 ▼8.2939.31 ▼6.81
Posts /wp-admin/edit.php2,130 ▲412.04 ▲0.0439.13 ▲1.2335.23 ▲0.97
Add New Post /wp-admin/post-new.php1,578 ▲3623.33 ▲4.94651.32 ▲44.9252.19 ▼10.32
Media Library /wp-admin/upload.php1,429 ▲414.27 ▲0.02100.88 ▲2.7047.05 ▲6.40
ConcertPress /wp-admin/admin.php?page=concertpress/concertpress.php1,0292.1829.5036.23
Events /wp-admin/admin.php?page=events1,8136.40120.8954.06
Programmes /wp-admin/admin.php?page=programmes1,5056.36108.9057.94
Archives /wp-admin/admin.php?page=archives1,0172.1440.3524.46
Venues /wp-admin/admin.php?page=venues1,0803.2360.5623.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_concertpress_events
    • wp_concertpress_programmes
    • wp_concertpress_venues
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • rps_cp_num_results
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_concertpress_id

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=events
    • > Notice in wp-content/plugins/concertpress/concertpress.php+1019
    Undefined variable: list

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/concertpress/html/add-venue-form.php
    • > /wp-content/plugins/concertpress/html/ajax.php
    • > /wp-content/plugins/concertpress/html/settings-page.php
  • 29× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/concertpress/php/addProgToDB.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/concertpress/html/list-events.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/concertpress/php/addVenueToDB.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/concertpress/php/addVenueToDB.php on line 6
    • > PHP Notice
      Undefined variable: editArray in wp-content/plugins/concertpress/php/addVenueToDB.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/concertpress/html/add-venue.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/concertpress/html/list-programmes.php:19
    • > PHP Notice
      Undefined variable: editArray in wp-content/plugins/concertpress/php/addProgToDB.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/concertpress/php/addVenueToDB.php on line 8
    • > PHP Notice
      Undefined variable: venue in wp-content/plugins/concertpress/php/addVenueToDB.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=venues
    • > Console-api (warning) in unknown
    http://maps.google.com/maps/api/js?sensor=false&ver=6.3.1 208:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Add/edit events page), #2 (Add/edit venues page), #3 (Add/edit programmes page)
Please take inspiration from this readme.txt

concertpress/concertpress.php Passed 13 tests

The primary PHP file in "ConcertPress" version 1.1.2 is used by WordPress to initiate all plugin functionality
46 characters long description:
A concert diary plugin for classical musicians

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected4,080 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,6128962,433
JavaScript36122831,058
CSS295154589

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity57.00
▷ Minimum class complexity4.00
▷ Maximum class complexity110.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods4397.73%
▷ Protected methods00.00%
▷ Private methods12.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/calendar_icon.png1.96KB1.25KB▼ 36.43%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
css/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%