90% wpcom-crosspost

Code Review | WP.com Cross-Post

WordPress plugin WP.com Cross-Post scored90%from 54 tests.

About plugin

  • Plugin page: wpcom-crosspost
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Sep 3, 2016
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: nicolamustone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▲3.80ms] Passed 4 tests

Server-side resources used by WP.com Cross-Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.43 ▲1.26
Dashboard /wp-admin3.39 ▲0.0958.60 ▲5.35
Posts /wp-admin/edit.php3.51 ▲0.1551.19 ▲0.38
Add New Post /wp-admin/post-new.php5.97 ▲0.09102.92 ▲8.19
Media Library /wp-admin/upload.php3.31 ▲0.0942.16 ▲8.20
WP.com X-Post /wp-admin/options-general.php?page=wpcom-crosspost3.2934.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP.com Cross-Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.75 ▲0.402.01 ▲0.1542.17 ▼0.75
Dashboard /wp-admin2,202 ▲255.65 ▼0.0385.25 ▼14.5940.16 ▼3.21
Posts /wp-admin/edit.php2,101 ▼22.00 ▲0.0335.56 ▼2.2136.74 ▲0.26
Add New Post /wp-admin/post-new.php1,529 ▲323.16 ▲0.18660.22 ▼9.1654.76 ▼3.86
Media Library /wp-admin/upload.php1,401 ▲44.19 ▼0.06100.53 ▼24.4344.19 ▼4.60
WP.com X-Post /wp-admin/options-general.php?page=wpcom-crosspost8952.0023.5729.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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 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
7 plugin tags: cross, wordpresscom, categories, cross-posts, blog...

wpcom-crosspost/wpcom-crosspost.php 92% from 13 tests

Analyzing the main PHP file in "WP.com Cross-Post" version 1.0.0
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 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
There were no executable files found in this plugin336 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP387183336

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.33
▷ Minimum class complexity6.00
▷ Maximum class complexity21.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods2388.46%
▷ Protected methods00.00%
▷ Private methods311.54%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin