83% cross-network-posts

Code Review | Cross-Network posts

WordPress plugin Cross-Network posts scored83%from 54 tests.

About plugin

  • Plugin page: cross-network-posts
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 26, 2013
  • Latest release: May 16, 2013
  • Number of updates: 40
  • Update frequency: every 0.5 days
  • Top authors: DanielTulp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.80ms] Passed 4 tests

This is a short check of server-side resources used by Cross-Network posts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.58 ▼12.97
Dashboard /wp-admin3.31 ▲0.0049.77 ▼1.35
Posts /wp-admin/edit.php3.36 ▲0.0046.12 ▼11.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.65 ▼13.82
Media Library /wp-admin/upload.php3.23 ▲0.0037.90 ▼0.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cross-Network posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼0.784.94 ▲1.9544.85 ▼11.04
Dashboard /wp-admin2,206 ▲185.06 ▼0.84106.07 ▼10.9144.47 ▲4.28
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0436.27 ▼5.5334.95 ▼7.76
Add New Post /wp-admin/post-new.php1,533 ▼023.36 ▲0.13637.14 ▼22.4976.22 ▲9.44
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.03102.25 ▼20.0043.87 ▼3.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/cross-network-posts/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/cross-network-posts/cnp.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

cross-network-posts/cnp.php 85% from 13 tests

Analyzing the main PHP file in "Cross-Network posts" version 2.0
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cross-network-posts.php" instead of "cnp.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 246 characters long)

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
There were no executable files found in this plugin517 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37895458
JavaScript14059

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity14.00
▷ Minimum class complexity6.00
▷ Maximum class complexity22.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods763.64%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
cnp-icon.png0.58KB0.57KB▼ 2.36%