89% zip-attachments

Code Review | Zip Attachments

WordPress plugin Zip Attachments scored89%from 54 tests.

About plugin

  • Plugin page: zip-attachments
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.4
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Oct 21, 2015
  • Number of updates: 24
  • Update frequency: every 21.8 days
  • Top authors: quicoto (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /7,549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.30ms] Passed 4 tests

This is a short check of server-side resources used by Zip Attachments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.96 ▼4.71
Dashboard /wp-admin3.34 ▲0.0344.49 ▼6.43
Posts /wp-admin/edit.php3.40 ▲0.0449.46 ▲4.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.26 ▼34.05
Media Library /wp-admin/upload.php3.27 ▲0.0336.64 ▲4.41

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 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 Zip Attachments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.74 ▲0.341.86 ▼0.0040.00 ▼9.09
Dashboard /wp-admin2,206 ▲215.86 ▲0.96109.95 ▲4.7037.54 ▼1.57
Posts /wp-admin/edit.php2,108 ▲161.98 ▼0.0640.17 ▼2.5736.53 ▲2.76
Add New Post /wp-admin/post-new.php1,542 ▲1418.00 ▼0.03710.13 ▲83.8458.27 ▲3.13
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.04101.67 ▼2.8142.12 ▼1.34

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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Using the Twenty Fourteen Theme.), #2 (Using the Twenty Thirteen Theme.), #3 (Using the Twenty Twelve Theme.)
The official readme.txt might help

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

Analyzing the main PHP file in "Zip Attachments" version 1.6
65 characters long description:
Add a button to create a zip with the post/page file attachments.

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
Success! There were no dangerous files found in this plugin138 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28351123
JavaScript10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.76MB with 0.54MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png309.72KB91.80KB▼ 70.36%
screenshot-1.png217.94KB62.11KB▼ 71.50%
screenshot-3.png255.23KB74.42KB▼ 70.84%