88% freeflow

Code Review | FreeFlow Content Plugin for WordPress

WordPress plugin FreeFlow Content Plugin for WordPress scored 88% from 54 tests.

About plugin

  • Plugin page: freeflow
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Nov 6, 2019
  • Latest release: Nov 11, 2019
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: freeflowcontent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 360 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼297.25ms] Passed 4 tests

A check of server-side resources used by FreeFlow Content Plugin for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.24 ▼0.2720.85 ▼27.82
Dashboard /wp-admin3.58 ▲0.1833.70 ▲2.30
Posts /wp-admin/edit.php3.81 ▲0.1745.78 ▲9.43
Add New Post /wp-admin/post-new.php7.06 ▲0.0994.32 ▼1,155.75
Media Library /wp-admin/upload.php3.47 ▲0.1724.56 ▼7.71
Settings /wp-admin/admin.php?page=freeflow3.4423.91
Dashboard /wp-admin/admin.php?page=freeflow-dashboard3.4423.45
Entries /wp-admin/admin.php?page=freeflow-entries3.4523.26

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, no new options
New tables
wp_freeflow_entries

Browser metrics Passed 4 tests

An overview of browser requirements for FreeFlow Content Plugin for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,586 ▲84217.45 ▲1.38116.06 ▲110.09200.93 ▲198.76
Dashboard /wp-admin2,958 ▲977.12 ▲0.99117.86 ▼13.51174.26 ▲17.04
Posts /wp-admin/edit.php2,722 ▲283.51 ▲0.2867.36 ▲1.27138.01 ▼5.90
Add New Post /wp-admin/post-new.php1,717 ▲2719.22 ▼1.98385.12 ▼47.44185.01 ▲25.75
Media Library /wp-admin/upload.php1,761 ▲606.20 ▲0.68125.56 ▼11.46202.79 ▲13.65
Settings /wp-admin/admin.php?page=freeflow1,2943.0456.53121.78
Dashboard /wp-admin/admin.php?page=freeflow-dashboard1,1473.89132.71133.06
Entries /wp-admin/admin.php?page=freeflow-entries1,3233.2759.49100.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/freeflow/templates/freeflow-bar.php
  • 18× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/freeflow/include/class-entries-list.php on line 10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/freeflow/templates/dashboard.php:85
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/freeflow/templates/freeflow-bar.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/freeflow/templates/freeflow-bar.php on line 13
    • > PHP Notice
      Undefined variable: remaining in wp-content/plugins/freeflow/templates/freeflow-bar.php on line 13
    • > PHP Notice
      Undefined variable: entries in wp-content/plugins/freeflow/templates/dashboard.php on line 26
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/freeflow/templates/freeflow-bar.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/freeflow/functions.php:59
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/freeflow/include/class-entries-list.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/freeflow/templates/freeflow-bar.php on line 10

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is missing
The official readme.txt is a good inspiration

freeflow/freeflow.php Passed 13 tests

The main PHP script in "FreeFlow Content Plugin for WordPress" version 1.0.1 is automatically included on every request by WordPress
85 characters long description:
Give visitors a sampling of your paid content and increase your subscription revenue.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,189 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP83141651,062
JavaScript423677
CSS210250

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity20.67
▷ Minimum class complexity2.00
▷ Maximum class complexity46.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3081.08%
▷ Protected methods00.00%
▷ Private methods718.92%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon16.png1.60KB0.86KB▼ 46.49%