84% mapbb

Code Review | MapBBCode for WordPress

WordPress plugin MapBBCode for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: mapbb
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2013
  • Latest release: Nov 6, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: shoorick (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,160 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.46ms] Passed 4 tests

Server-side resources used by MapBBCode for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.61 ▼2.24
Dashboard /wp-admin3.32 ▼0.0347.37 ▼17.33
Posts /wp-admin/edit.php3.37 ▲0.0146.24 ▼6.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.60 ▼19.38
Media Library /wp-admin/upload.php3.24 ▲0.0136.10 ▼0.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for MapBBCode for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲13114.60 ▼0.0311.72 ▲9.5640.14 ▼13.49
Dashboard /wp-admin2,209 ▲184.88 ▲0.00109.90 ▼8.1641.31 ▼1.30
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0234.54 ▼6.1035.86 ▼4.22
Add New Post /wp-admin/post-new.php1,541 ▲823.03 ▼0.11672.67 ▼16.2658.14 ▲7.27
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0796.62 ▼24.7041.31 ▼10.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapbb/mapbb.php:52

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 issues were found

Optimizations

Plugin configuration Passed 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
7 plugin tags: mapbbcode, shortcode, map, leaflet, osm...

mapbb/mapbb.php Passed 13 tests

"MapBBCode for WordPress" version 0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Allows use [map] codes for Leaflet maps embedding info pages

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,070 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82711182,299
CSS410334674
PHP1151641
Markdown116037
HTML101819

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.03
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/lib/images/spritesheet.png0.80KB0.49KB▼ 38.34%
dist/lib/images/spritesheet-2x.png1.43KB0.83KB▼ 41.85%
dist/lib/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
dist/lib/images/layers.png1.47KB1.05KB▼ 28.36%
dist/lib/images/marker-icon.png1.71KB1.56KB▼ 8.59%