10% image-crosspost

Code Review | Image Crosspost

WordPress plugin Image Crosspost scored10%from 54 tests.

About plugin

  • Plugin page: image-crosspost
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7+
  • WordPress version: 6.3.1
  • First release: Apr 10, 2012
  • Latest release: Jun 8, 2012
  • Number of updates: 36
  • Update frequency: every 1.7 days
  • Top authors: pivari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,028 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.

Server metrics [RAM: ▼0.92MB] [CPU: ▼38.15ms] Passed 4 tests

This is a short check of server-side resources used by Image Crosspost
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.42 ▼4.04
Dashboard /wp-admin3.02 ▼0.2824.61 ▼26.88
Posts /wp-admin/edit.php3.02 ▼0.3324.99 ▼27.08
Add New Post /wp-admin/post-new.php3.02 ▼2.8623.83 ▼79.26
Media Library /wp-admin/upload.php3.02 ▼0.2123.17 ▼19.36
Image Crosspost /wp-admin/options-general.php?page=imagecrosspost3.0231.21

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
flickrprivacy
fromemail
widget_recent-comments
flickremail
theysaidso_admin_options
widget_theysaidso_widget
fromname
twitpicemail
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Image Crosspost
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.18 ▼1.201.96 ▲0.1842.23 ▼4.13
Dashboard /wp-admin2,219 ▲165.84 ▲0.99102.69 ▼7.3541.98 ▲0.23
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0136.61 ▼2.9234.00 ▼2.57
Add New Post /wp-admin/post-new.php1,548 ▲523.32 ▲0.27663.36 ▲32.1853.02 ▼2.01
Media Library /wp-admin/upload.php1,407 ▲44.17 ▼0.0799.42 ▼2.2947.18 ▲0.08
Image Crosspost /wp-admin/options-general.php?page=imagecrosspost9492.0225.0825.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=imagecrosspost
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/image-crosspost/options.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/image-crosspost/image-crosspost.php:31

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 93% 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
Please fix the following attributes:
  • Tested up to: The plugin version is formatted incorrectly
  • Screenshots: Please add images for these screenshots: #1 (Image Crosspost settings page.), #2 (Image Crosspost settings page in italian language.)
The official readme.txt is a good inspiration

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

The principal PHP file in "Image Crosspost" v. 3.0.0 is loaded by WordPress automatically on each request
100 characters long description:
Crosspost images in a published post via email. Supported Flickr, Twitpic, Twitgoo, Twitrpix, img.ly

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23239190
PO File110032

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.26KB13.49KB▼ 50.54%
screenshot-2.png26.42KB13.60KB▼ 48.51%