72% mapple

Code Review | Mapple

WordPress plugin Mapple scored72%from 54 tests.

About plugin

  • Plugin page: mapple
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 18, 2018
  • Latest release: Oct 19, 2018
  • Number of updates: 20
  • Update frequency: every 9.2 days
  • Top authors: andrekelling (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /828 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.77ms] Passed 4 tests

A check of server-side resources used by Mapple
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0229.62 ▼12.77
Dashboard /wp-admin3.39 ▲0.0949.38 ▲1.09
Posts /wp-admin/edit.php3.51 ▲0.1563.29 ▲18.15
Add New Post /wp-admin/post-new.php6.05 ▲0.1694.10 ▼0.13
Media Library /wp-admin/upload.php3.29 ▲0.0735.63 ▲0.72
Clients /wp-admin/edit.php?post_type=clients3.3737.76
Settings /wp-admin/edit.php?post_type=clients&page=mapple-settings3.3335.45
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=clients3.3237.41
Add New Client /wp-admin/post-new.php?post_type=clients5.6570.73

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Mapple
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲26914.84 ▲0.461.83 ▼0.0241.42 ▼3.33
Dashboard /wp-admin2,380 ▲1926.50 ▲1.61134.44 ▲19.6941.05 ▼4.10
Posts /wp-admin/edit.php2,289 ▲2003.33 ▲1.2855.06 ▲16.9435.40 ▲5.31
Add New Post /wp-admin/post-new.php1,559 ▲3723.42 ▲0.42659.43 ▼27.3837.74 ▼23.07
Media Library /wp-admin/upload.php1,425 ▲434.25 ▲0.0580.59 ▼29.7641.99 ▼5.58
Clients /wp-admin/edit.php?post_type=clients1,2553.3247.9737.32
Settings /wp-admin/edit.php?post_type=clients&page=mapple-settings1,1433.3737.4626.96
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=clients1,5013.1342.7228.73
Add New Client /wp-admin/post-new.php?post_type=clients6,29519.77812.6334.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=clients
    • > Notice in wp-content/plugins/mapple/admin/partials/mapple-admin-field-text-address.php+21
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mapple/public/templates/mapple-client-table-end.php
    • > /wp-content/plugins/mapple/public/templates/mapple-client-search.php
    • > /wp-content/plugins/mapple/public/partials/mapple-public-display.php
    • > /wp-content/plugins/mapple/admin/partials/mapple-admin-display.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mapple/admin/partials/mapple-admin-field-image.php:18
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mapple/public/templates/mapple-client-search.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mapple/admin/partials/mapple-admin-field-text.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/mapple/public/templates/mapple-client-content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mapple/admin/partials/mapple-admin-field-text-address.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mapple/public/templates/mapple-loop-clients.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/mapple/admin/partials/mapple-admin-metabox-client-additional-info.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/mapple/admin/partials/mapple-admin-field-textarea.php:18
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/mapple/public/templates/mapple-client-search.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/mapple/public/templates/mapple-client-search.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% 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
5 plugin tags: no style, client cpt, shortcode, no jquery, google maps

mapple/mapple.php 92% from 13 tests

The principal PHP file in "Mapple" v. 1.5.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 150 characters long)

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
Everything looks great! No dangerous files found in this plugin1,494 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP295021,1291,058
JavaScript25017239
CSS124586
PO File1263279
Markdown114032

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.17
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods68
▷ Static methods68.82%
▷ Public methods5276.47%
▷ Protected methods00.00%
▷ Private methods1623.53%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin