84% allow-epub-and-mobi-formats-upload

Code Review | Allow ePUB and MOBI formats upload

WordPress plugin Allow ePUB and MOBI formats upload scored84%from 54 tests.

About plugin

  • Plugin page: allow-epub-and-mo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Jan 18, 2017
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: eknizky (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /13,645 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.98ms] Passed 4 tests

An overview of server-side resources used by Allow ePUB and MOBI formats upload
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.38 ▼1.46
Dashboard /wp-admin3.31 ▲0.0146.42 ▼4.74
Posts /wp-admin/edit.php3.36 ▲0.0148.56 ▼4.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.24 ▼12.95
Media Library /wp-admin/upload.php3.24 ▲0.0137.35 ▲1.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Allow ePUB and MOBI formats upload
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▼0.001.70 ▼0.1845.01 ▲0.20
Dashboard /wp-admin2,195 ▲215.55 ▲0.0496.92 ▼6.9738.99 ▼5.50
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0443.40 ▲2.7035.68 ▲0.91
Add New Post /wp-admin/post-new.php1,535 ▼218.29 ▲0.20642.51 ▼4.4867.58 ▼0.73
Media Library /wp-admin/upload.php1,403 ▼04.18 ▼0.05100.33 ▼2.8343.98 ▼1.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/allow-epub-and-mobi-formats-upload/allow-epub-and-mobi-formats-upload.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


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: Please add images for these screenshots: #1 (Attachment page - uploaded ePUB file), #2 (Attachment page - uploaded MOBI file)
The official readme.txt is a good inspiration

allow-epub-and-mobi-formats-upload/allow-epub-and-mobi-formats-upload.php Passed 13 tests

The principal PHP file in "Allow ePUB and MOBI formats upload" v. 1.0 is loaded by WordPress automatically on each request
42 characters long description:
Upload ePUB and MOBI formats on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png11.08KB4.79KB▼ 56.75%
screenshot-1.png10.80KB4.68KB▼ 56.69%