62% pixobe-cartography

Code Review | Pixobe Cartography

WordPress plugin Pixobe Cartography scored62%from 54 tests.

About plugin

  • Plugin page: pixobe-cartography
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 12, 2020
  • Latest release: Oct 15, 2020
  • Number of updates: 8
  • Update frequency: every 11.9 days
  • Top authors: pixobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /321 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.60MB] [CPU: ▼16.05ms] Passed 4 tests

Analyzing server-side resources used by Pixobe Cartography
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.53 ▲0.37
Dashboard /wp-admin3.37 ▲0.0646.73 ▼0.32
Posts /wp-admin/edit.php3.48 ▲0.1246.81 ▼1.68
Add New Post /wp-admin/post-new.php3.31 ▼2.5836.88 ▼62.55
Media Library /wp-admin/upload.php3.29 ▲0.0636.28 ▲1.87
Add New /wp-admin/admin.php?page=pixobe_map_add3.2630.93
All Maps /wp-admin/admin.php?page=pixobe-cartography3.2632.00
Info /wp-admin/admin.php?page=pixobe_map_info3.2632.82

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
pixobe_cartography_maps
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Pixobe Cartography
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19814.82 ▲0.525.95 ▲4.4038.40 ▼0.95
Dashboard /wp-admin2,235 ▲445.84 ▲0.97112.19 ▲8.4441.95 ▲1.13
Posts /wp-admin/edit.php2,127 ▲352.99 ▲0.9838.80 ▲3.6331.59 ▼0.07
Add New Post /wp-admin/post-new.php1,699 ▲16622.39 ▼0.85661.14 ▼21.7630.56 ▼29.91
Media Library /wp-admin/upload.php1,423 ▲355.16 ▲0.9299.16 ▲0.2441.86 ▼7.14
Add New /wp-admin/admin.php?page=pixobe_map_add1,3303.3532.2752.86
All Maps /wp-admin/admin.php?page=pixobe-cartography9222.7930.8637.54
Info /wp-admin/admin.php?page=pixobe_map_info1,0082.7831.3248.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • pixobe_cartography_maps
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pixobe-cartography/includes/partials/admin_add_page.php
    • > /wp-content/plugins/pixobe-cartography/includes/partials/admin_home_page.php
    • > /wp-content/plugins/pixobe-cartography/includes/partials/admin_footer.php
    • > /wp-content/plugins/pixobe-cartography/includes/partials/admin_info_page.php
    • > /wp-content/plugins/pixobe-cartography/includes/db/Pixobe_Cartography_Maps.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/pixobe-cartography/includes/partials/admin_header.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/pixobe-cartography/includes/rest/Pixobe_Rest_Controller.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pixobe_map_add
    • > Deprecation (warning) in unknown
    /wp-content/plugins/pixobe-cartography/public/build/admin.js?ver=1.0.0 7 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pixobe_map_info
    • > Network (severe)
    https://www.cartography.page/images/logos/cartography.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/admin.php?page=pixobe-cartography
    • > Network (severe)
    wp-json/pixobe-cartography/v1/maps - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Screenshots: A description for screenshot #6 is required in pixobe-cartography/assets to your readme.txt
You can take inspiration from this readme.txt

pixobe-cartography/pixobe-cartography.php 92% from 13 tests

The principal PHP file in "Pixobe Cartography" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)

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
There were no executable files found in this plugin525 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP15168606507
CSS10015
JavaScript2083

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.56
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods45
▷ Static methods48.89%
▷ Public methods4191.11%
▷ Protected methods00.00%
▷ Private methods48.89%
Functions4
▷ Named functions4100.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 are no PNG files in this plugin