83% wp-cfm

Code Review | WP-CFM

WordPress plugin WP-CFM scored83%from 54 tests.

About plugin

  • Plugin page: wp-cfm
  • Plugin version: 1.7.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: May 30, 2014
  • Latest release: Nov 1, 2023
  • Number of updates: 39
  • Update frequency: every 88.3 days
  • Top authors: mgibbs189 (69.23%)forum1 (33.33%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /182,290 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WP-CFM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0348.06 ▲3.29
Dashboard /wp-admin3.33 ▼0.0248.67 ▼15.66
Posts /wp-admin/edit.php3.38 ▲0.0246.16 ▼2.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.09 ▼2.57
Media Library /wp-admin/upload.php3.25 ▲0.0233.95 ▼0.70
WP-CFM /wp-admin/options-general.php?page=wpcfm3.3837.82

Server storage [IO: ▲0.43MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • You have illegally modified 1 file (0.00KB) outside of "wp-content/plugins/wp-cfm/" and "wp-content/uploads/"
    • (new file) wp-content/config/.empty
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP-CFM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.39 ▼0.141.75 ▼0.2245.08 ▲2.14
Dashboard /wp-admin2,193 ▲135.55 ▼0.0983.55 ▼10.2237.69 ▼4.05
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0435.99 ▼3.3435.21 ▼2.37
Add New Post /wp-admin/post-new.php1,531 ▲323.27 ▲0.14634.50 ▼44.3362.15 ▲3.85
Media Library /wp-admin/upload.php1,401 ▲14.19 ▼0.0096.02 ▼11.5943.35 ▼4.54
WP-CFM /wp-admin/options-general.php?page=wpcfm1,6292.1228.7524.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Yaml\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-cfm/vendor/symfony/yaml/Exception/RuntimeException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/wp-cfm/vendor/symfony/yaml/Exception/ParseException.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-cfm/includes/integrations/taxonomy.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-cfm/templates/page-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/wp-cfm/vendor/symfony/yaml/Command/LintCommand.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Yaml\\Exception\\RuntimeException' not found in wp-content/plugins/wp-cfm/vendor/symfony/yaml/Exception/DumpException.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
6 plugin tags: settings, features, configuration management, wordpress, wp-cli...

wp-cfm/wp-cfm.php 92% from 13 tests

The main PHP script in "WP-CFM" version 1.7.8 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "5.0")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin5,368 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,0231,5424,101
JSON500513
Markdown61140319
JavaScript85325303
CSS2385132

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity35.00
▷ Minimum class complexity1.00
▷ Maximum class complexity299.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes27.69%
Methods199
▷ Static methods5829.15%
▷ Public methods14170.85%
▷ Protected methods21.01%
▷ Private methods5628.14%
Functions34
▷ Named functions2470.59%
▷ Anonymous functions1029.41%
Constants33
▷ Global constants1236.36%
▷ Class constants2163.64%
▷ Public constants1990.48%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin