68% manara-business-locator

Code Review | Manara Business Locator

WordPress plugin Manara Business Locator scored68%from 54 tests.

About plugin

  • Plugin page: manara-business-l...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Jan 2, 2016
  • Latest release: Jul 28, 2016
  • Number of updates: 8
  • Update frequency: every 26.2 days
  • Top authors: rodrigomanara (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /582 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼9.71ms] Passed 4 tests

This is a short check of server-side resources used by Manara Business Locator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.11 ▼5.70
Dashboard /wp-admin3.46 ▲0.1644.22 ▼3.24
Posts /wp-admin/edit.php3.49 ▲0.1443.50 ▼3.10
Add New Post /wp-admin/post-new.php6.11 ▲0.2276.38 ▼26.80
Media Library /wp-admin/upload.php3.33 ▲0.1132.61 ▼1.96

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 679 new files
Database: 2 new tables, 6 new options
New tables
wp_latitude_manara_business_locator
wp_setting_manara_business_locator
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Manara Business Locator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.28 ▼1.394.35 ▲2.3634.46 ▼9.00
Dashboard /wp-admin2,224 ▲365.94 ▲1.03104.84 ▼0.1483.12 ▲36.79
Posts /wp-admin/edit.php2,107 ▲152.01 ▼0.0537.98 ▼2.1836.17 ▼0.62
Add New Post /wp-admin/post-new.php1,529 ▼422.86 ▼0.65766.35 ▲170.4658.71 ▲7.07
Media Library /wp-admin/upload.php1,400 ▲184.19 ▼0.0496.60 ▼2.1277.25 ▲36.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_latitude_manara_business_locator
    • wp_setting_manara_business_locator
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/manara-business-locator/manara_business_locator.php
  • 220× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node_Expression_Binary' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/Node/Expression/Binary/Matches.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/Node/SetTemp.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/TokenParser/Macro.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Error' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/Error/Loader.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_IntegrationTestCase' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/Node/Body.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_BaseNodeVisitor' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_TokenParser' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/TokenParser/Import.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_TestInterface' not found in wp-content/plugins/manara-business-locator/vendor/twig/twig/lib/Twig/Test.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% 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
4 plugin tags: latitude, google maps, business, locator

manara-business-locator/manara_business_locator.php 85% from 13 tests

"Manara Business Locator" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("manara-business-locator.php" instead of "manara_business_locator.php")
  • Git Repository: There should be no Git repositories present in your plugin

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
Everything looks great! No dangerous files found in this plugin23,054 lines of code in 415 files:
LanguageFilesBlank linesComment linesLines of code
PHP2743,3526,22314,270
reStructuredText882,2832,0303,153
CSS2414132,470
JavaScript146083021,804
C1161174792
Twig17631328
JSON320129
YAML17131
XML12023
HTML110017
SQL181517
C/C++ Header171315
m41215

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.51
▷ Minimum class complexity1.00
▷ Maximum class complexity121.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces4
Interfaces22
Traits0
Classes271
▷ Abstract classes145.17%
▷ Concrete classes25794.83%
▷ Final classes00.00%
Methods1,270
▷ Static methods131.02%
▷ Public methods1,11787.95%
▷ Protected methods12910.16%
▷ Private methods241.89%
Functions65
▷ Named functions6295.38%
▷ Anonymous functions34.62%
Constants48
▷ Global constants48.33%
▷ Class constants4491.67%
▷ Public constants44100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
Application/public/images/look.png0.59KB0.44KB▼ 25.91%