79% zip-embed

Code Review | Zip Embed

WordPress plugin Zip Embed scored79%from 54 tests.

About plugin

  • Plugin page: zip-embed
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.2.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2011
  • Latest release: Nov 12, 2011
  • Number of updates: 9
  • Update frequency: every 36.7 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,735 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.13MB] [CPU: ▼17.16ms] Passed 4 tests

Analyzing server-side resources used by Zip Embed
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.64 ▼6.45
Dashboard /wp-admin3.23 ▼0.0729.27 ▼18.13
Posts /wp-admin/edit.php3.30 ▼0.0634.86 ▼12.14
Add New Post /wp-admin/post-new.php5.49 ▼0.4069.46 ▼27.82
Media Library /wp-admin/upload.php3.24 ▲0.0128.96 ▼10.55
All Zips /wp-admin/edit.php?post_type=zip3.2836.58
Upload Zip /wp-admin/edit.php?post_type=zip&page=zip_embed3.2030.04
Zip Embed Options /wp-admin/edit.php?post_type=zip&page=zip_embed_options3.2026.65

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Zip Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲20614.08 ▼0.295.57 ▲3.8345.69 ▼2.69
Dashboard /wp-admin2,237 ▲494.86 ▼0.04112.76 ▼1.7642.25 ▲0.01
Posts /wp-admin/edit.php2,120 ▲312.01 ▼0.0139.56 ▼1.8734.10 ▼1.35
Add New Post /wp-admin/post-new.php1,568 ▲3518.40 ▼4.84618.48 ▼51.4549.19 ▼31.26
Media Library /wp-admin/upload.php1,422 ▲314.19 ▼0.0196.75 ▼8.9844.34 ▼3.63
All Zips /wp-admin/edit.php?post_type=zip1,0921.9334.8532.09
Upload Zip /wp-admin/edit.php?post_type=zip&page=zip_embed8002.0326.5726.01
Zip Embed Options /wp-admin/edit.php?post_type=zip&page=zip_embed_options8532.0324.9035.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=zip&page=zip_embed_options
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/zip-embed/zip-embed.php:45

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: media library, upload, zip

zip-embed/zip-embed.php Passed 13 tests

Analyzing the main PHP file in "Zip Embed" version 0.4
40 characters long description:
Upload a zip file and embed its contents

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected431 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP159231431

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected