72% neptune-business

Code Review | Neptune Business

WordPress plugin Neptune Business scored72%from 54 tests.

About plugin

  • Plugin page: neptune-business
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Oct 2, 2018
  • Latest release: Oct 17, 2018
  • Number of updates: 15
  • Update frequency: every 1.7 days
  • Top authors: themeplanet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,089 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.60ms] Passed 4 tests

This is a short check of server-side resources used by Neptune Business
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1040.18 ▲2.87
Dashboard /wp-admin3.43 ▲0.1345.84 ▲0.28
Posts /wp-admin/edit.php3.48 ▲0.1348.90 ▲0.57
Add New Post /wp-admin/post-new.php5.97 ▲0.0982.85 ▼9.42
Media Library /wp-admin/upload.php3.29 ▲0.0736.20 ▲2.16
Google API KEY /wp-admin/options-general.php?page=google_maps_api_key3.2632.48
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.3630.94

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Neptune Business
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19915.06 ▲0.709.88 ▲8.1438.88 ▼3.68
Dashboard /wp-admin2,270 ▲935.54 ▼0.01101.74 ▲14.3941.90 ▲2.98
Posts /wp-admin/edit.php2,149 ▲492.92 ▲0.9047.71 ▲11.8244.34 ▲8.75
Add New Post /wp-admin/post-new.php1,591 ▲6323.58 ▲0.47672.10 ▼0.1137.80 ▼11.31
Media Library /wp-admin/upload.php1,492 ▲925.14 ▲0.98104.08 ▲5.0251.22 ▲10.42
Google API KEY /wp-admin/options-general.php?page=google_maps_api_key8762.4833.9026.98
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0452.4735.1230.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/neptune-business/admin/partials/neptune-busines-admin-display.php
    • > /wp-content/plugins/neptune-business/public/partials/neptune-busines-public-display.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/neptune-business/includes/libraries/tgm/example.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/neptune-business/templates/blocks/blogs.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neptune-business/templates/home-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/neptune-business/templates/blocks/maps.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/neptune-business/templates/blocks/header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/neptune-business/templates/blocks/feature.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/neptune-business/includes/libraries/tgm/class-tgm-plugin-activation.php:2016
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/neptune-business/templates/class-neptune-business-template.php:153
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_field() in wp-content/plugins/neptune-business/templates/blocks/cta.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Network (severe)
    wp-content/plugins/neptune-business/admin/js/gmaps.js?ver=982060008 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=places&key&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === neptune-business === )
The official readme.txt is a good inspiration

neptune-business/neptune-busines.php 85% from 13 tests

The principal PHP file in "Neptune Business" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("neptune-business.php" instead of "neptune-busines.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin4,967 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP237342,3083,168
JSON100813
Markdown41850778
CSS21315146
JavaScript34812362

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.81
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods136
▷ Static methods85.88%
▷ Public methods10577.21%
▷ Protected methods2316.91%
▷ Private methods85.88%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin