46% dancepress

Code Review | Dancesport Features | The plugin for dancing.

WordPress plugin Dancesport Features | The plugin for dancing. scored46%from 54 tests.

About plugin

  • Plugin page: dancepress
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 15, 2018
  • Latest release: Apr 16, 2018
  • Number of updates: 18
  • Update frequency: every 1.8 days
  • Top authors: frickemedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.72MB] [CPU: ▼32.40ms] Passed 4 tests

An overview of server-side resources used by Dancesport Features | The plugin for dancing.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1436.83 ▼6.75
Dashboard /wp-admin3.22 ▼0.0823.78 ▼26.63
Posts /wp-admin/edit.php3.23 ▼0.1324.70 ▼21.60
Add New Post /wp-admin/post-new.php3.22 ▼2.6725.42 ▼68.92
Media Library /wp-admin/upload.php3.23 ▼0.0124.20 ▼12.45
Add Result /wp-admin/admin.php?page=dancesport-features-add-result3.2323.99

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: 1 new table, 8 new options
New tables
wp_dancesport_features_results
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
dancesport_features_db_updates
widget_theysaidso_widget
dancesport_features_db_version
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Dancesport Features | The plugin for dancing.
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲19313.57 ▼0.834.89 ▲2.9941.26 ▼10.99
Dashboard /wp-admin2,226 ▲374.85 ▼0.09110.24 ▼8.7238.48 ▼10.27
Posts /wp-admin/edit.php2,109 ▲231.99 ▼0.0340.79 ▲7.1533.89 ▼4.02
Add New Post /wp-admin/post-new.php1,547 ▲523.25 ▲5.00645.00 ▲28.3153.89 ▼15.95
Media Library /wp-admin/upload.php1,408 ▲234.24 ▲0.0099.61 ▼2.0442.63 ▼4.49
Add Result /wp-admin/admin.php?page=dancesport-features-add-result9582.0223.2922.40

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/dancepress/admin/class-dancesport-features-admin.php+152
    Trying to access array offset on value of type bool
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_dancesport_features_results
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • dancesport_features_db_version
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • dancesport_features_db_updates

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dancesport-features-add-result
    • > Notice in wp-content/plugins/dancepress/admin/partials/dancesport-features-admin-add-result-display.php+93
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=dancesport-features-add-result
    • > Notice in wp-content/plugins/dancepress/admin/partials/dancesport-features-admin-add-result-display.php+67
    Undefined variable: user_group

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/dancepress/public/partials/dancesport-features-public-display-ranking.php
    • > /wp-content/plugins/dancepress/public/partials/dancesport-features-public-display.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dancepress/admin/partials/dancesport-features-user-meta-display.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-dancers-table.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-dancers-table.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dancepress/admin/partials/dancesport-features-admin-add-result-display.php:20
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-results-table.php on line 19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-results-table.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/dancepress/public/partials/dancesport-features-public-display-add-result-form.php:19
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-dancers-table.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/dancepress/admin/partials/class-dancesport-features-admin-results-table.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dancepress/public/partials/dancesport-features-public-display-results.php:21

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=dancesport-features-add-result
    • > Network (severe)
    wp-content/plugins/dancepress/admin/css/dancesport_features-admin.css?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=dancesport-features-add-result
    • > Network (severe)
    wp-content/plugins/dancepress/admin/js/dancesport_features-admin.js?ver=1.0.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: dancesport, dancer, sportsclub, dancers, club...

dancepress/dancesport-features.php 85% from 13 tests

The primary PHP file in "Dancesport Features | The plugin for dancing." version 1.4.1 is used by WordPress to initiate all plugin functionality
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 ("dancepress.php" instead of "dancesport-features.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

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
No dangerous file extensions were detected1,438 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP204398881,255
PO File165118159
CSS27818
JavaScript26546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.78
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods69
▷ Static methods1115.94%
▷ Public methods6492.75%
▷ Protected methods00.00%
▷ Private methods57.25%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/partials/dancesport-features_crown.png80.69KB27.72KB▼ 65.65%
public/partials/dancesport_features_crown_small.png3.89KB1.33KB▼ 65.80%