83% swfobject-reloaded

Code Review | swfObject Reloaded

WordPress plugin swfObject Reloaded scored 83% from 54 tests.

About plugin

  • Plugin page: swfobject-reloaded
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2010
  • Latest release: Oct 12, 2012
  • Number of updates: 27
  • Update frequency: every 27.6 days
  • Top authors: CodeAndReload (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 30,707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.02ms] Passed 4 tests

An overview of server-side resources used by swfObject Reloaded
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.39 ▼0.01
Dashboard /wp-admin3.38 ▲0.0745.53 ▼2.15
Posts /wp-admin/edit.php3.43 ▲0.0748.34 ▼0.18
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.14 ▲5.82
Media Library /wp-admin/upload.php3.30 ▲0.0737.49 ▲2.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
mc_altcontent_setting_name
mc_setting_name
mc_flashver_setting_name
mc_iphone_setting_name

Browser metrics Passed 4 tests

An overview of browser requirements for swfObject Reloaded
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.23 ▼1.155.55 ▲3.8138.59 ▼7.48
Dashboard /wp-admin2,209 ▲245.86 ▲0.9994.95 ▼12.2737.18 ▼7.10
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0340.43 ▲5.1036.13 ▲3.19
Add New Post /wp-admin/post-new.php1,547 ▲518.26 ▲0.08592.07 ▼46.6659.90 ▼18.61
Media Library /wp-admin/upload.php1,388 ▼34.13 ▼0.1396.12 ▼7.2941.66 ▼0.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • mc_setting_name
    • mc_flashver_setting_name
    • widget_recent-comments
    • widget_recent-posts
    • mc_iphone_setting_name
    • can_compress_scripts
    • mc_altcontent_setting_name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/swfobject-reloaded/wp_swf_shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swfobject-reloaded/wp_swf_media_options.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/swfobject-reloaded/wp_swf_object.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (This is the media upload screen showing the new fields added by **swfObject Reloaded** for Width, Height and), #2 (This is the swfObject's settings added to the Settings->Media menu.)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

swfobject-reloaded/wp_swf_object.php 85% from 13 tests

The main file in "swfObject Reloaded" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("swfobject-reloaded.php" instead of "wp_swf_object.php")
  • Description: The description should be shorter than 140 characters (currently 365 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
Everything looks great! No dangerous files found in this plugin307 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP410679307

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png80.81KB27.65KB▼ 65.79%
screenshot-1.png57.61KB19.61KB▼ 65.96%