68% post-forking

Code Review | Post Forking

WordPress plugin Post Forking scored 68% from 54 tests.

About plugin

  • Plugin page: post-forking
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Sep 20, 2012
  • Latest release: Sep 27, 2013
  • Number of updates: 11
  • Update frequency: every 34.3 days
  • Top authors: benbalter (81.82%)jorbin (27.27%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active / 6,873 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼36.31ms] Passed 4 tests

Server-side resources used by Post Forking
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2439.33 ▼5.31
Dashboard /wp-admin3.33 ▲0.0318.90 ▼27.31
Posts /wp-admin/edit.php3.33 ▼0.0319.80 ▼24.92
Add New Post /wp-admin/post-new.php3.33 ▼2.5619.25 ▼80.21
Media Library /wp-admin/upload.php3.33 ▲0.1020.95 ▼12.79
Settings /wp-admin/edit.php?post_type=fork&page=fork_settings3.3319.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Post Forking
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7214.84 ▲0.431.65 ▼0.4441.05 ▼7.53
Dashboard /wp-admin2,235 ▲445.85 ▲0.93100.06 ▼6.5775.22 ▲36.29
Posts /wp-admin/edit.php2,126 ▲372.05 ▲0.0334.98 ▼2.8129.89 ▼0.61
Add New Post /wp-admin/post-new.php1,541 ▲2717.60 ▼0.17768.80 ▲77.5147.71 ▲1.72
Media Library /wp-admin/upload.php1,411 ▲234.13 ▼0.0595.55 ▼12.5078.83 ▲32.03
Settings /wp-admin/edit.php?post_type=fork&page=fork_settings8612.2225.6625.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/post-forking/includes/diff3.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; Text_Diff3 has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=fork&page=fork_settings
    • > Deprecated in wp-content/plugins/post-forking/includes/diff3.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; Text_Diff3 has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=fork&page=fork_settings
    • > Deprecated in wp-content/plugins/post-forking/includes/diff3.php+161
    Methods with the same name as their class will not be constructors in a future version of PHP; Text_Diff3_Op has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=fork&page=fork_settings
    • > Deprecated in wp-content/plugins/post-forking/includes/diff3.php+200
    Methods with the same name as their class will not be constructors in a future version of PHP; Text_Diff3_Op_copy has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=fork&page=fork_settings
    • > Deprecated in wp-content/plugins/post-forking/includes/diff3.php+227
    Methods with the same name as their class will not be constructors in a future version of PHP; Text_Diff3_BlockBuilder has a deprecated constructor

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
The following issues need your attention
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Forking_Test' not found in wp-content/plugins/post-forking/tests/test_post_forking_capabilities.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_url() in wp-content/plugins/post-forking/templates/author-post-meta-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-forking/templates/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-forking/templates/branches-dropdown.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Text_Diff' not found in wp-content/plugins/post-forking/includes/diff3.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Forking_Test' not found in wp-content/plugins/post-forking/tests/test_post_forking_merge.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Forking_Test' not found in wp-content/plugins/post-forking/tests/test_post_forking_revisions.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Forking_Test' not found in wp-content/plugins/post-forking/tests/test_post_forking_branches.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/post-forking/tests/post_forking_test.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/post-forking/templates/post-meta-box.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: collaborative editing, collaboration, git, forks, forking...

post-forking/post-forking.php 85% from 13 tests

"Post Forking" version 0.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin8,794 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript96325265,867
PHP256915491,432
HTML21230590
PO File3133150349
CSS44734262
Bourne Shell33020117
Markdown2580110
JSON10045
XML20022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.70
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods130
▷ Static methods00.00%
▷ Public methods130100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon32.png0.63KB0.55KB▼ 13.04%
img/icon64.png1.04KB0.84KB▼ 19.68%
img/menu-icon.png0.40KB0.38KB▼ 3.91%