84% firstchoice-integration

Code Review | FirstChoice Integration

WordPress plugin FirstChoice Integration scored84%from 54 tests.

About plugin

  • Plugin page: firstchoice-integ...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 23, 2022
  • Latest release: Feb 23, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: momadhoun (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 total downloads

Benchmarks

Plugin footprint 83% from 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.13MB] [CPU: ▼3.76ms] Passed 4 tests

This is a short check of server-side resources used by FirstChoice Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.39 ▼0.57
Dashboard /wp-admin3.44 ▲0.1344.59 ▼2.41
Posts /wp-admin/edit.php3.55 ▲0.1950.20 ▲2.25
Add New Post /wp-admin/post-new.php6.02 ▲0.1381.52 ▼12.20
Media Library /wp-admin/upload.php3.36 ▲0.1335.32 ▲0.15

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
modified_after
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for FirstChoice Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17813.55 ▼1.045.24 ▲3.4240.76 ▼8.44
Dashboard /wp-admin2,222 ▲315.80 ▼0.1197.76 ▼4.6337.86 ▼4.35
Posts /wp-admin/edit.php2,107 ▲182.04 ▼0.0139.64 ▲3.3836.27 ▲1.47
Add New Post /wp-admin/post-new.php1,548 ▲623.06 ▼0.07566.32 ▼120.6769.06 ▲11.35
Media Library /wp-admin/upload.php1,407 ▲164.19 ▼0.1295.85 ▼3.5740.25 ▼4.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • modified_after
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/firstchoice-integration/inc/firstchoice-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce, firstchoice api, firstchoice

firstchoice-integration/firstchoice.php 85% from 13 tests

This is the main PHP file of "FirstChoice Integration" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("firstchoice-integration.php" instead of "firstchoice.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected736 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24175733
JavaScript1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity108.00
▷ Minimum class complexity108.00
▷ Maximum class complexity108.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods2388.46%
▷ Public methods2596.15%
▷ Protected methods00.00%
▷ Private methods13.85%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin