78% mapplic-lite

Code Review | Mapplic Lite

WordPress plugin Mapplic Lite scored78%from 54 tests.

About plugin

  • Plugin page: mapplic-lite
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Mar 25, 2021
  • Number of updates: 9
  • Update frequency: every 39.1 days
  • Top authors: sekler (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,459 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.97ms] 75% from 4 tests

An overview of server-side resources used by Mapplic Lite
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 518.19ms on /wp-admin/edit.php?post_type=mapplic_map)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.31 ▼0.16
Dashboard /wp-admin3.52 ▲0.2154.77 ▲5.87
Posts /wp-admin/edit.php3.63 ▲0.2750.65 ▼8.64
Add New Post /wp-admin/post-new.php6.10 ▲0.2189.73 ▼16.95
Media Library /wp-admin/upload.php3.44 ▲0.2144.38 ▲7.32
Add New /wp-admin/post-new.php?post_type=mapplic_map3.4945.71
Upgrade /wp-admin/edit.php?post_type=mapplic_map&page=upgrade_mapplic3.4537.85
All Maps /wp-admin/edit.php?post_type=mapplic_map3.68518.19

Server storage [IO: ▲2.04MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 84 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
mapplic-lite-version
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Mapplic Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.27 ▲0.241.70 ▼0.2140.35 ▼4.07
Dashboard /wp-admin2,227 ▲475.57 ▼0.1383.11 ▼7.5139.92 ▼7.27
Posts /wp-admin/edit.php2,135 ▲352.04 ▲0.0438.84 ▲1.0835.44 ▼1.10
Add New Post /wp-admin/post-new.php1,572 ▲4123.35 ▲0.30668.64 ▲5.9654.56 ▲0.02
Media Library /wp-admin/upload.php1,432 ▲354.23 ▼0.02111.46 ▲1.1547.84 ▲1.17
Add New /wp-admin/post-new.php?post_type=mapplic_map1,8213.8774.7489.46
Upgrade /wp-admin/edit.php?post_type=mapplic_map&page=upgrade_mapplic8442.0122.9729.73
All Maps /wp-admin/edit.php?post_type=mapplic_map2,0573.3264.4285.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • mapplic-lite-version
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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)
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=mapplic_map&page=upgrade_mapplic
    • > Warning in wp-admin/upgrade.php+57
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
    • > GET request to /wp-admin/edit.php?post_type=mapplic_map&page=upgrade_mapplic
    • > Notice in wp-admin/upgrade.php+71
    Undefined variable: wp_db_version

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mapplic-lite/admin/upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mapplic-lite/trunk/admin/upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapplic-lite/mapplic-lite.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapplic-lite/trunk/mapplic-lite.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

mapplic-lite/mapplic-lite.php Passed 13 tests

"Mapplic Lite" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
103 characters long description:
Turn simple images and vector graphics into high quality, responsive and fully interactive custom maps.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin15,543 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
SVG171918,071
JavaScript69634203,429
CSS54861322,986
PHP7182901,057

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.50
▷ Minimum class complexity7.00
▷ Maximum class complexity18.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pin-image.png0.41KB0.25KB▼ 38.57%
trunk/admin/img/transparency-grid.png2.58KB2.80KB0.00%
trunk/core/images/error-icon.png3.34KB0.90KB▼ 73.14%
trunk/images/pin-image.png0.41KB0.25KB▼ 38.57%
admin/img/transparency-grid.png2.58KB2.80KB0.00%