84% cfs-ninja-forms-selector

Code Review | CFS - Ninja Forms Selector

WordPress plugin CFS - Ninja Forms Selector scored 84% from 54 tests.

About plugin

  • Plugin page: cfs-ninja-forms-s...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 24, 2015
  • Latest release: Nov 14, 2018
  • Number of updates: 5
  • Update frequency: every 223.4 days
  • Top authors: jrtashjian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by CFS - Ninja Forms Selector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.93 ▼1.27
Dashboard /wp-admin3.31 ▲0.0148.53 ▲0.61
Posts /wp-admin/edit.php3.36 ▲0.0143.64 ▼3.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.60 ▼6.91
Media Library /wp-admin/upload.php3.23 ▲0.0136.83 ▲4.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CFS - Ninja Forms Selector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.60 ▼0.824.40 ▲2.0939.58 ▼14.94
Dashboard /wp-admin2,206 ▲155.84 ▲0.9495.54 ▼9.1436.45 ▼9.87
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0138.18 ▲2.7331.41 ▼2.31
Add New Post /wp-admin/post-new.php1,542 ▲923.15 ▼0.12611.02 ▼84.3457.47 ▼4.61
Media Library /wp-admin/upload.php1,388 ▲34.28 ▲0.0894.60 ▼4.6942.67 ▼0.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'cfs_field' not found in wp-content/plugins/cfs-ninja-forms-selector/cfs-ninja-forms-field.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: custom field suite, field type, ninja forms, cfs

cfs-ninja-forms-selector/cfs-ninja-forms-selector.php 92% from 13 tests

The main PHP script in "CFS - Ninja Forms Selector" version 1.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 detected49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2202445
Markdown1204

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

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