78% franchise-manager

Code Review | Franchise Manager

WordPress plugin Franchise Manager scored 78% from 54 tests.

About plugin

  • Plugin page: franchise-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.2.2
  • WordPress version: 6.3.1
  • First release: May 12, 2015
  • Latest release: Oct 4, 2016
  • Number of updates: 17
  • Update frequency: every 30.3 days
  • Top authors: kuldip_raghu (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.56MB] [CPU: ▼16.05ms] Passed 4 tests

A check of server-side resources used by Franchise Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.99 ▼2.19
Dashboard /wp-admin3.44 ▲0.1346.86 ▼2.80
Posts /wp-admin/edit.php3.49 ▲0.1346.24 ▼0.59
Add New Post /wp-admin/post-new.php3.27 ▼2.6236.63 ▼56.91
Media Library /wp-admin/upload.php3.36 ▲0.1334.71 ▼2.28
Add New /wp-admin/post-new.php?post_type=franchsie3.2235.35
All Franchise /wp-admin/edit.php?post_type=franchsie3.4038.69

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Franchise Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8913.18 ▼1.131.63 ▼0.4647.57 ▲1.10
Dashboard /wp-admin2,241 ▲535.75 ▲0.8497.66 ▼20.3837.63 ▼10.63
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0333.14 ▼0.3737.74 ▲2.67
Add New Post /wp-admin/post-new.php1,403 ▼13118.99 ▼4.12514.36 ▼157.8354.87 ▲0.24
Media Library /wp-admin/upload.php1,423 ▲384.17 ▼0.0394.39 ▼22.6238.70 ▼10.69
Franchise Settings /wp-admin/franchise-manager.php260.440.1012.32
Add New /wp-admin/post-new.php?post_type=franchsie2,5537.68166.2474.33
All Franchise /wp-admin/edit.php?post_type=franchsie1,0971.9930.0331.44

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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 errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+734
    Undefined index: franchise_noncename_so_1444
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+242
    Undefined offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+114
    Trying to get property 'country' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+139
    Trying to get property 'types_of_industry' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+155
    Trying to get property 'estimated_investement' of non-object
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+161
    Trying to get property 'currency' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+176
    Trying to get property 'marketin_support' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+192
    Trying to get property 'training_support' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+209
    Trying to get property 'year_of_establish' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+213
    Undefined variable: j
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+226
    Trying to get property 'number_of_existing_unit' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=franchsie
    • > Notice in wp-content/plugins/franchise-manager/franchise-manager.php+242
    Trying to get property 'sizeofunit' of non-object

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/franchise-manager.php
    • > Network (severe)
    wp-admin/franchise-manager.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === franchise-manager === )
Please take inspiration from this readme.txt

franchise-manager/franchise-manager.php Passed 13 tests

The main file in "Franchise Manager" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
76 characters long description:
Franchise Manager allow to display list of franchise with franchise gallery.

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
No dangerous file extensions were detected1,260 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14846715
JavaScript186108397
CSS2163148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
images/icon.png1.45KB0.73KB▼ 49.63%