78% wp-crosspost

Code Review | WordPress Crosspost

WordPress plugin WordPress Crosspost scored78%from 54 tests.

About plugin

  • Plugin page: wp-crosspost
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2014
  • Latest release: Mar 2, 2016
  • Number of updates: 32
  • Update frequency: every 70.5 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

90+ active /6,698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.98MB] [CPU: ▲1.03ms] Passed 4 tests

Server-side resources used by WordPress Crosspost
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.45 ▲0.9843.77 ▲3.18
Dashboard /wp-admin4.29 ▲0.9852.15 ▼4.27
Posts /wp-admin/edit.php4.34 ▲0.9856.42 ▲9.84
Add New Post /wp-admin/post-new.php6.86 ▲0.9786.92 ▼4.45
Media Library /wp-admin/upload.php4.21 ▲0.9744.64 ▲9.66
WordPress Crosspost /wp-admin/options-general.php?page=wp_crosspost_settings4.0937.89
WP-Crosspost-ify Archives /wp-admin/tools.php?page=wp_crosspost_crosspost_archives4.0938.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Crosspost
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.62 ▼0.644.63 ▲2.9643.34 ▲0.24
Dashboard /wp-admin2,216 ▲284.88 ▼0.02105.17 ▼4.2038.89 ▼6.77
Posts /wp-admin/edit.php2,099 ▲102.01 ▲0.0137.33 ▲0.5735.03 ▲0.75
Add New Post /wp-admin/post-new.php6,282 ▲4,74925.82 ▲2.35990.73 ▲293.9659.47 ▲5.49
Media Library /wp-admin/upload.php1,398 ▲74.18 ▼0.03101.45 ▼0.2943.87 ▼2.36
WordPress Crosspost /wp-admin/options-general.php?page=wp_crosspost_settings8332.0523.7833.58
WP-Crosspost-ify Archives /wp-admin/tools.php?page=wp_crosspost_crosspost_archives7782.0423.9130.69

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=wp_crosspost_crosspost_archives
    • > Notice in wp-content/plugins/wp-crosspost/wp-crosspost.php+1421
    Trying to access array offset on value of type bool

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-crosspost/wp-crosspost.php:47

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 errors were detected

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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (When you first install WP-Crosspost, you'll need to connect it to your WordPress.com account before you can start crossposting. This screenshot shows how its options screen first appears after you activate the plugin.), #2 (Once you create and enter your client ID and secret, click "Save Changes." The options screen prompts you to connect to WordPress.com with another button. Press the "Click here to connect to WordPress.com" button to begin the OAuth connection process.), #3 (After allowing WP-Crosspost access to your WordPress.com account, you'll find you're able to access the remainder of the options page. You must choose at least one default WordPress site to send your crossposts to, so this option is highlighted if it is not yet set. Set your cross-posting preferences and click "Save Changes." You're now ready to start crossposting!), #4 (You can optionally choose not to crosspost individual WordPress posts from the WP-Crosspost custom post editing box. This box also enables you to send a specific post to a WordPress.com site other than the default one you selected in the previous step, and crosspost the post's excerpt rather than its main body.), #5 (Get help where you need it from WordPress's built-in "Help" system.)
You can look at the official readme.txt

wp-crosspost/wp-crosspost.php Passed 13 tests

The main file in "WordPress Crosspost" v. 0.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
113 characters long description:
Automatically crossposts to your WordPress.com site when you publish a post on your (self-hosted) WordPress blog.

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin5,177 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP73012,1044,784
JSON1500377
CSS10016

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 129)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity142.33
▷ Minimum class complexity1.00
▷ Maximum class complexity631.00
Average method complexity9.65
▷ Minimum method complexity1.00
▷ Maximum method complexity129.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes333.33%
▷ Concrete classes666.67%
▷ Final classes00.00%
Methods149
▷ Static methods00.00%
▷ Public methods11073.83%
▷ Protected methods21.34%
▷ Private methods3724.83%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
5 PNG files occupy 0.45MB with 0.28MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png27.09KB9.04KB▼ 66.64%
screenshot-5.png108.06KB41.65KB▼ 61.46%
screenshot-1.png77.85KB28.30KB▼ 63.65%
screenshot-3.png164.72KB67.59KB▼ 58.97%
screenshot-2.png85.17KB31.60KB▼ 62.89%