84% tablacus-maps

Code Review | Tablacus maps

WordPress plugin Tablacus maps scored84%from 54 tests.

About plugin

  • Plugin page: tablacus-maps
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2018
  • Latest release: Nov 2, 2018
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: tablacus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.36ms] Passed 4 tests

An overview of server-side resources used by Tablacus maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.31 ▲0.73
Dashboard /wp-admin3.32 ▲0.0148.51 ▼0.88
Posts /wp-admin/edit.php3.37 ▲0.0143.14 ▼7.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.88 ▼14.85
Media Library /wp-admin/upload.php3.24 ▲0.0132.68 ▼2.53

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Tablacus maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.39 ▼0.295.35 ▲3.6342.37 ▲1.22
Dashboard /wp-admin2,208 ▲175.99 ▲0.10112.70 ▲8.8544.23 ▲3.22
Posts /wp-admin/edit.php2,100 ▲112.81 ▲0.7836.74 ▼5.7332.67 ▼6.92
Add New Post /wp-admin/post-new.php1,522 ▼1123.73 ▲0.34597.79 ▼63.2334.54 ▼25.38
Media Library /wp-admin/upload.php1,399 ▲145.19 ▲0.86108.60 ▼3.5544.36 ▼3.84

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tablacus-maps/tablacus-maps.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: leaflet, openstreetmap, map

tablacus-maps/tablacus-maps.php Passed 13 tests

The principal PHP file in "Tablacus maps" v. 1.0.2 is loaded by WordPress automatically on each request
40 characters long description:
Use OpenStreetMap instead of Google Maps

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin17,259 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45,2466,75716,680
CSS15323559
PHP141220

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
leaflet/images/layers-2x.png1.23KB1.67KB0.00%
leaflet/images/marker-icon.png1.43KB1.55KB0.00%
leaflet/images/layers.png0.68KB1.05KB0.00%
leaflet/images/marker-shadow.png0.60KB1.16KB0.00%
leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%