83% business

Code Review | Wordpress Business Plugin

WordPress plugin Wordpress Business Plugin scored 83% from 54 tests.

About plugin

  • Plugin page: business
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6.1
  • WordPress version: 5.8.1
  • First release: May 28, 2014
  • Latest release: Nov 4, 2016
  • Number of updates: 11
  • Update frequency: every 81.0 days
  • Top authors: snilesh (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 4,145 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
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼144.15ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Business Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.12 ▲0.2854.32 ▲17.72
Dashboard /wp-admin3.37 ▲0.3254.89 ▼8.89
Posts /wp-admin/edit.php3.48 ▲0.3755.72 ▲2.95
Add New Post /wp-admin/post-new.php5.72 ▲0.29102.71 ▼572.40
Media Library /wp-admin/upload.php3.30 ▲0.3040.78 ▲1.75
Add New Question /wp-admin/post-new.php?post_type=snilesh-faq3.4555.75
Testimonials Categories /wp-admin/edit-tags.php?taxonomy=testimonials-category&post_type=snilesh-testimonials3.3041.55
Add New Team Member /wp-admin/post-new.php?post_type=snilesh-team3.4584.00
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=snilesh-team3.3041.07
All FAQ Questions /wp-admin/edit.php?post_type=snilesh-faq3.3440.55
All Team Members /wp-admin/edit.php?post_type=snilesh-team3.3442.63
All Testimonials /wp-admin/edit.php?post_type=snilesh-testimonials3.3439.83
Add New Testimonial /wp-admin/post-new.php?post_type=snilesh-testimonials3.4559.43
FAQ Categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=snilesh-faq3.3037.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 272 new files
Database: no new tables, 1 new option
New WordPress options
nsbp_updated_versionposttype12

Browser metrics Passed 4 tests

Checking browser requirements for Wordpress Business Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,964 ▲36817.02 ▲1.1114.39 ▲4.7552.26 ▼2.85
Dashboard /wp-admin3,121 ▲1906.75 ▲0.78164.44 ▼8.03141.10 ▲23.68
Posts /wp-admin/edit.php2,915 ▲1762.78 ▲0.0779.66 ▼0.29116.91 ▲20.98
Add New Post /wp-admin/post-new.php1,794 ▲11118.45 ▼0.31401.71 ▼2.38114.66 ▼1.87
Media Library /wp-admin/upload.php1,909 ▲1025.39 ▲0.32174.58 ▲9.09144.79 ▲20.00
Add New Question /wp-admin/post-new.php?post_type=snilesh-faq3,1929.30254.89186.68
Testimonials Categories /wp-admin/edit-tags.php?taxonomy=testimonials-category&post_type=snilesh-testimonials1,9142.6975.14106.72
Add New Team Member /wp-admin/post-new.php?post_type=snilesh-team3,4219.21333.62208.62
Departments /wp-admin/edit-tags.php?taxonomy=department&post_type=snilesh-team1,9112.6862.85103.63
All FAQ Questions /wp-admin/edit.php?post_type=snilesh-faq1,5852.7276.41108.07
All Team Members /wp-admin/edit.php?post_type=snilesh-team1,6122.7280.0591.80
All Testimonials /wp-admin/edit.php?post_type=snilesh-testimonials1,6092.7168.4192.52
Add New Testimonial /wp-admin/post-new.php?post_type=snilesh-testimonials3,2948.48260.10172.87
FAQ Categories /wp-admin/edit-tags.php?taxonomy=faq-category&post_type=snilesh-faq1,9142.6868.02102.74

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 option in the database
    • nsbp_updated_versionposttype12

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/business/inc/team/team-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/business/inc/faq/faq-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business/inc/admin/admin.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business/inc/testimonials/testimonials.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/business/wp-business.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/business/inc/testimonials/testimonial-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business/inc/team/team.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business/inc/faq/faq.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/business/inc/shortcodes.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (FAQ Page Created Using [FAQ] shortcode.), #2 (Testimonials Without Images using [testimonials image="false"] shortcode.), #3 (Testimonials Page created using [testimonials] shortcode.), #4 (Team Member's Page Created using [team column="4"] shortcode.), #5 (Skills added using [skills] shortcode.)
  • Tags: There are too many tags (51 tag instead of maximum 10)
The official readme.txt might help

business/wp-business.php 85% from 13 tests

"Wordpress Business Plugin" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("business.php" instead of "wp-business.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,670 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP91971121,192
CSS24552417
JavaScript21046
PO File10015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions39
▷ Named functions3692.31%
▷ Anonymous functions37.69%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
253 PNG files occupy 1.62MB with 1.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/social/white/flout.png3.05KB0.51KB▼ 83.25%
images/icons/social/yellow/vimeo.png3.14KB0.59KB▼ 81.24%
images/icons/social/white/myspace.png3.10KB0.62KB▼ 80.14%
images/icons/social/yellow/instagram.png13.40KB0.81KB▼ 93.97%
images/icons/social/black/pinterest.png13.37KB0.75KB▼ 94.39%