73% gecko-theme-parts

Code Review | Gecko Theme Parts

WordPress plugin Gecko Theme Parts scored73%from 54 tests.

About plugin

  • Plugin page: gecko-theme-parts
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: May 18, 2020
  • Latest release: May 18, 2020
  • Number of updates: 3
  • Update frequency: every 39.0 days
  • Top authors: musicalbigfoot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.66MB] [CPU: ▼14.03ms] Passed 4 tests

This is a short check of server-side resources used by Gecko Theme Parts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.86 ▲6.78
Dashboard /wp-admin3.34 ▲0.0446.09 ▼2.78
Posts /wp-admin/edit.php3.39 ▲0.0446.95 ▲0.88
Add New Post /wp-admin/post-new.php3.15 ▼2.7336.69 ▼55.83
Media Library /wp-admin/upload.php3.26 ▲0.0333.60 ▲1.63
Add New /wp-admin/post-new.php?post_type=gecko-theme-part3.1535.41
Theme Parts /wp-admin/edit.php?post_type=gecko-theme-part3.3137.50
Help /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-parts-help3.2631.14
Locations /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-part-locations3.2630.60

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Gecko Theme Parts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.33 ▼1.056.02 ▲4.2643.42 ▲1.94
Dashboard /wp-admin2,238 ▲474.86 ▼1.02104.66 ▲0.6538.96 ▼2.39
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0238.84 ▲2.6233.34 ▼1.61
Add New Post /wp-admin/post-new.php1,566 ▲2923.51 ▲0.14633.10 ▼34.7156.92 ▼0.07
Media Library /wp-admin/upload.php1,417 ▲294.24 ▼0.10102.46 ▲4.1145.60 ▲4.06
Add New /wp-admin/post-new.php?post_type=gecko-theme-part6,43523.33908.5031.45
Theme Parts /wp-admin/edit.php?post_type=gecko-theme-part1,0851.9931.2229.42
Help /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-parts-help8312.0330.9234.16
Locations /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-part-locations9189.5390.4526.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% 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)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=gecko-theme-part
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for gecko-theme-parts/v1/location-management-data is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

SRP 50% 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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/gecko-theme-parts/admin/partials/gecko-theme-parts-locations-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/gecko-theme-parts/admin/partials/gecko-theme-parts-help.php:34

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 user-side errors
    • > GET request to /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-part-locations
    • > Network (severe)
    wp-json/gecko-theme-parts/v1/location-management-data - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=gecko-theme-part&page=gecko-theme-part-locations
    • > Console-api (warning) in unknown
    /wp-content/plugins/gecko-theme-parts/admin/build/scripts/location-management.js?ver=1589814802 1:50857 Error: Request failed with status code 404at e.exports (/wp-content/plugins/gecko-theme-parts/admin/build/scripts/location-management.js?ver=1589814802:2:25047)at e.exports (/wp-content/plugins/gecko-theme-parts/admin/build/scripts/location-management.js?ver=1589814802:2:43736)at d.onreadystatechange (/wp-content/plugins/gecko-theme-parts/admin/build/scripts/location-management.js?ver=1589814802:2:23896)

Optimizations

Plugin configuration Passed 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
3 plugin tags: gutenberg, block editor, template

gecko-theme-parts/gecko-theme-parts.php Passed 13 tests

The main PHP file in "Gecko Theme Parts" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
47 characters long description:
Custom block areas to be used in template parts

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
Good job! No executable or dangerous file extensions detected425 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP15116108423
JSON1001
JavaScript1011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.20
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.46
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods37
▷ Static methods38.11%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
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
No PNG images were found in this plugin