83% edit-flow

Code Review | Edit Flow

WordPress plugin Edit Flow scored83%from 54 tests.

About plugin

  • Plugin page: edit-flow
  • Plugin version: 0.9.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Jun 13, 2009
  • Latest release: Aug 26, 2022
  • Number of updates: 291
  • Update frequency: every 16.6 days
  • Top authors: batmoo (49.14%)danielbachhuber (25.43%)sbressler (10.31%)comradefuzz (9.62%)automattic (3.09%)

Code review

54 tests

User reviews

49 reviews

Install metrics

7,000+ active /377,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.99MB] [CPU: ▲11.24ms] Passed 4 tests

Server-side resources used by Edit Flow
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.41 ▲1.9555.67 ▲14.02
Dashboard /wp-admin5.36 ▲2.0561.36 ▲11.22
Posts /wp-admin/edit.php5.40 ▲2.0464.36 ▲17.09
Add New Post /wp-admin/post-new.php7.83 ▲1.94102.40 ▲5.38
Media Library /wp-admin/upload.php5.25 ▲2.0249.66 ▲14.34
Edit Flow /wp-admin/admin.php?page=ef-settings5.1445.29
Editorial Metadata /wp-admin/admin.php?page=ef-editorial-metadata-settings5.1740.60
Calendar /wp-admin/admin.php?page=ef-calendar-settings5.1446.88
Dashboard Widgets /wp-admin/admin.php?page=ef-dashboard-settings5.1443.24
Custom Statuses /wp-admin/admin.php?page=ef-custom-status-settings5.1744.83
Editorial Comments /wp-admin/admin.php?page=ef-editorial-comments-settings5.1443.94
User Groups /wp-admin/admin.php?page=ef-user-groups-settings5.1845.88
Notifications /wp-admin/admin.php?page=ef-notifications-settings5.1442.42

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 169 new files
Database: no new tables, 16 new options
New WordPress options
edit_flow_notifications_options
edit_flow_story_budget_options
widget_theysaidso_widget
widget_recent-comments
edit_flow_editorial_comments_options
edit_flow_dashboard_options
edit_flow_editorial_metadata_options
edit_flow_version
edit_flow_custom_status_options
edit_flow_user_groups_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Edit Flow
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,253 ▲49613.33 ▼0.961.81 ▼0.2131.85 ▼13.24
Dashboard /wp-admin2,647 ▲4595.14 ▼0.76115.29 ▲13.2473.70 ▲29.19
Posts /wp-admin/edit.php2,322 ▲2332.75 ▲0.7761.71 ▲23.4371.36 ▲37.73
Add New Post /wp-admin/post-new.php6,690 ▲5,15219.29 ▼4.06899.72 ▲215.8850.43 ▼3.54
Media Library /wp-admin/upload.php1,469 ▲784.48 ▲0.17103.38 ▲6.4567.49 ▲24.15
Edit Flow /wp-admin/admin.php?page=ef-settings1,0482.1725.9747.03
Editorial Metadata /wp-admin/admin.php?page=ef-editorial-metadata-settings1,4262.2736.9837.01
Calendar /wp-admin/admin.php?page=ef-calendar-settings1,0002.1725.5730.81
Dashboard Widgets /wp-admin/admin.php?page=ef-dashboard-settings9502.1728.3529.23
Custom Statuses /wp-admin/admin.php?page=ef-custom-status-settings1,3712.2735.2334.32
Editorial Comments /wp-admin/admin.php?page=ef-editorial-comments-settings9562.1726.3431.23
User Groups /wp-admin/admin.php?page=ef-user-groups-settings1,2702.3328.5433.42
Notifications /wp-admin/admin.php?page=ef-notifications-settings9782.1725.8830.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 16 options in the database
    • edit_flow_editorial_metadata_options
    • edit_flow_editorial_comments_options
    • theysaidso_admin_options
    • edit_flow_notifications_options
    • edit_flow_settings_options
    • edit_flow_user_groups_options
    • widget_recent-comments
    • edit_flow_calendar_options
    • widget_theysaidso_widget
    • edit_flow_dashboard_options
    • ...

Smoke tests 75% 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 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
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/edit-flow/tests/test-edit-flow-notifications.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EF_Module' not found in wp-content/plugins/edit-flow/modules/editorial-metadata/editorial-metadata.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'EF_Module' not found in wp-content/plugins/edit-flow/modules/notifications/notifications.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/edit-flow/vipgo-helper.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'EF_Module' not found in wp-content/plugins/edit-flow/modules/calendar/calendar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/edit-flow/tests/testcase-edit-flow-ajax.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/edit-flow/tests/test-edit-flow-dashboard-notepad.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Edit_Flow_Ajax_UnitTestCase' not found in wp-content/plugins/edit-flow/tests/test-edit-flow-custom-status-ajax.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/edit-flow/tests/test-edit-flow-story-budget.php:3
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/edit-flow/tests/bootstrap.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The calendar is a convenient month-by-month look at your content. Filter to specific statuses or categories to drill down.), #2 (Custom statuses allow you to define the key stages of your workflow.), #3 (Editorial comments allow for private discussion between writers and editors on a post-by-post basis.), #4 (Keep track of the important details with editorial metadata.), #5 (View all of your upcoming posts with the more traditional story budget view, and hit the print button to take it to your planning meeting.)
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

edit-flow/edit_flow.php 92% from 13 tests

The main PHP script in "Edit Flow" version 0.9.7 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edit-flow.php" instead of "edit_flow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected57,563 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
JSON30034,477
PO File83,2656,4678,109
PHP292,0943,3098,008
JavaScript358147564,568
CSS16251831,433
Markdown72510585
Bourne Shell34112182
Sass6240160
XML33041

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity47.26
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods434
▷ Static methods153.46%
▷ Public methods42197.00%
▷ Protected methods20.46%
▷ Private methods112.53%
Functions26
▷ Named functions1142.31%
▷ Anonymous functions1557.69%
Constants20
▷ Global constants840.00%
▷ Class constants1260.00%
▷ Public constants12100.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
33 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/settings/lib/eflogo_s32w.png0.44KB0.78KB0.00%
modules/story-budget/lib/story_budget_s128.png0.66KB0.58KB▼ 12.22%
modules/settings/lib/eflogo_s32.png0.44KB0.78KB0.00%
modules/editorial-metadata/lib/editorial_metadata_s16.png0.38KB0.33KB▼ 12.21%
modules/editorial-comments/lib/editorial_comments_s16.png0.37KB0.37KB0.00%