83% heraldbee

Code Review | Heraldbee - the simple advertising app

WordPress plugin Heraldbee - the simple advertising app scored83%from 54 tests.

About plugin

  • Plugin page: heraldbee
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Feb 27, 2020
  • Latest release: Apr 15, 2020
  • Number of updates: 9
  • Update frequency: every 5.4 days
  • Top authors: heraldbee (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.88ms] Passed 4 tests

Server-side resources used by Heraldbee - the simple advertising app
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.38 ▼2.17
Dashboard /wp-admin3.31 ▲0.0149.84 ▼1.05
Posts /wp-admin/edit.php3.36 ▲0.0147.69 ▼2.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.45 ▼17.30
Media Library /wp-admin/upload.php3.24 ▲0.0137.14 ▲1.63

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Heraldbee - the simple advertising app: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.25 ▼1.111.83 ▼0.3548.85 ▲0.49
Dashboard /wp-admin2,206 ▲154.86 ▼0.24104.78 ▼0.6441.15 ▼10.01
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0137.27 ▼1.7731.87 ▼3.30
Add New Post /wp-admin/post-new.php1,519 ▼2423.09 ▲4.90683.93 ▲63.5856.75 ▲6.98
Media Library /wp-admin/upload.php1,388 ▲64.20 ▲0.0496.12 ▼5.1542.47 ▼1.91

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/heraldbee/class-wc-heraldbee.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/heraldbee/pages/getstarted.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/heraldbee/class-wc-heraldbee-integration.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
1 plugin tags: google ads

heraldbee/class-wc-heraldbee.php 85% from 13 tests

The main PHP file in "Heraldbee - the simple advertising app" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("heraldbee.php" instead of "class-wc-heraldbee.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 234 characters long)

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
There were no executable files found in this plugin99 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP366457
Sass10022
CSS13020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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 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
7 PNG files occupy 1.15MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/step2.png213.96KB74.12KB▼ 65.36%
assets/img/step5.png170.60KB62.80KB▼ 63.19%
assets/img/logo.png72.72KB34.15KB▼ 53.04%
assets/img/step3.png178.53KB64.02KB▼ 64.14%
assets/img/step4.png163.12KB61.40KB▼ 62.36%