82% locatoragency

Code Review | LocatorAgency

WordPress plugin LocatorAgency scored 82% from 54 tests.

About plugin

  • Plugin page: locatoragency
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jul 31, 2013
  • Latest release: Jul 31, 2013
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: amineoujda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 501 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼139.00ms] Passed 4 tests

A check of server-side resources used by LocatorAgency
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.1045.44 ▲17.94
Dashboard /wp-admin3.16 ▲0.1045.76 ▲2.82
Posts /wp-admin/edit.php3.22 ▲0.0944.82 ▼6.80
Add New Post /wp-admin/post-new.php5.52 ▲0.0891.53 ▼554.04
Media Library /wp-admin/upload.php3.11 ▲0.1034.04 ▲2.02
Locators /wp-admin/edit.php?post_type=locator_agency3.1530.85
Add new Locator /wp-admin/post-new.php?post_type=locator_agency3.2252.27
Locator Option /wp-admin/options-general.php?page=slug-agency-locator3.0530.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 54 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for LocatorAgency
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,969 ▲33217.54 ▲2.0420.41 ▲9.7659.57 ▲12.90
Dashboard /wp-admin3,115 ▲1786.64 ▲0.67138.09 ▼4.86113.92 ▲5.20
Posts /wp-admin/edit.php2,884 ▲1452.97 ▲0.2570.36 ▲7.7795.60 ▲3.14
Add New Post /wp-admin/post-new.php1,710 ▲21219.01 ▲0.22372.41 ▼5.08120.82 ▲7.74
Media Library /wp-admin/upload.php1,934 ▲1275.70 ▲0.66129.36 ▼20.16121.82 ▲1.26
Locators /wp-admin/edit.php?post_type=locator_agency1,5513.1566.1978.82
Add new Locator /wp-admin/post-new.php?post_type=locator_agency3,2249.42218.80156.22
Locator Option /wp-admin/options-general.php?page=slug-agency-locator1,5612.7754.12100.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=slug-agency-locator
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=slug-agency-locator
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/locatoragency/view/meta_adresse_locator.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/locatoragency/index.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=locator_agency
    • > Network (severe)
    http://maps.googleapis.com/maps/api/mapsjs/gen_204?csp_test=true - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 ('/assets/screenshot-1.png'), #2 (`/assets/screenshot-2.png`), #3 (`/assets/screenshot-3.png`)
You can take inspiration from this readme.txt

locatoragency/index.php 92% from 13 tests

"LocatorAgency" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("locatoragency.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected627 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP462113499
PO File1345082
CSS25036
JavaScript11010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.50
▷ Minimum class complexity4.00
▷ Maximum class complexity27.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
43 PNG files occupy 0.27MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/pin.png2.91KB1.90KB▼ 34.62%
images/icons/nursery.png0.92KB0.66KB▼ 28.92%
images/icons/nanny.png0.99KB0.70KB▼ 29.41%
images/icons/drugstore.png0.68KB0.46KB▼ 31.65%
images/icons/group-2.png0.86KB0.67KB▼ 22.01%