84% ff-posts-pages-and-cpt-field-type

Code Review | Formidable Forms Posts, Pages and CPT Field Type

WordPress plugin Formidable Forms Posts, Pages and CPT Field Type scored84%from 54 tests.

About plugin

  • Plugin page: ff-posts-pages-an...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 13, 2018
  • Latest release: Aug 13, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: PropertyHive (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /876 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
Install script ran successfully

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

A check of server-side resources used by Formidable Forms Posts, Pages and CPT Field Type
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.60 ▼2.68
Dashboard /wp-admin3.31 ▲0.0148.22 ▼5.09
Posts /wp-admin/edit.php3.36 ▲0.0146.33 ▼9.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.41 ▼4.05
Media Library /wp-admin/upload.php3.24 ▲0.0137.07 ▲1.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Formidable Forms Posts, Pages and CPT Field Type
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.31 ▼0.061.78 ▼0.0040.75 ▼1.73
Dashboard /wp-admin2,195 ▲275.66 ▼0.0687.71 ▼10.7940.96 ▼5.34
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0839.74 ▲1.6833.66 ▼1.80
Add New Post /wp-admin/post-new.php1,526 ▼517.64 ▼5.53649.63 ▲15.0151.49 ▼3.31
Media Library /wp-admin/upload.php1,403 ▼04.27 ▲0.0698.94 ▼3.5243.56 ▼1.39

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

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

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'FrmFieldType' not found in wp-content/plugins/ff-posts-pages-and-cpt-field-type/FrmFieldPostsPagesCPT.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: forms, form, custom post type, cpt, formidable forms...

ff-posts-pages-and-cpt-field-type/formidable-posts-pages-cpt-field-type.php 92% from 13 tests

The primary PHP file in "Formidable Forms Posts, Pages and CPT Field Type" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ff-posts-pages-and-cpt-field-type.php" instead of "formidable-posts-pages-cpt-field-type.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin226 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25263226

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.00
▷ Minimum class complexity9.00
▷ Maximum class complexity23.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods11
▷ Static methods19.09%
▷ Public methods763.64%
▷ Protected methods218.18%
▷ Private methods218.18%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png13.04KB6.06KB▼ 53.48%