83% tape

Code Review | Tape

WordPress plugin Tape scored83%from 54 tests.

About plugin

  • Plugin page: tape
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2019
  • Latest release: Mar 13, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: trytape (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /525 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.81ms] Passed 4 tests

This is a short check of server-side resources used by Tape
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.63 ▼7.41
Dashboard /wp-admin3.36 ▲0.0545.66 ▼0.41
Posts /wp-admin/edit.php3.47 ▲0.1149.12 ▲1.39
Add New Post /wp-admin/post-new.php5.96 ▲0.0789.62 ▲2.11
Media Library /wp-admin/upload.php3.28 ▲0.0533.58 ▼0.82

Server storage [IO: ▲0.55MB] [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: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Tape
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17214.93 ▲0.189.82 ▲7.8243.60 ▼0.70
Dashboard /wp-admin2,213 ▲255.85 ▼0.0394.54 ▼8.0138.88 ▼3.17
Posts /wp-admin/edit.php2,093 ▲12.06 ▲0.0740.28 ▼0.9135.26 ▼1.30
Add New Post /wp-admin/post-new.php1,532 ▲1823.00 ▲5.56684.22 ▲64.5850.89 ▲3.23
Media Library /wp-admin/upload.php1,386 ▲14.24 ▲0.02104.74 ▲5.2240.59 ▼1.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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)
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tape/admin/partials/tape-plugin-admin-display.php
    • > /wp-content/plugins/tape/public/partials/tape-plugin-public-display.php

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

tape/tape-plugin.php 85% from 13 tests

The principal PHP file in "Tape" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tape.php" instead of "tape-plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin852 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42673528
PHP12119530221
CSS32311103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/flags.png69.20KB23.42KB▼ 66.16%
public/img/flags@2x.png170.28KB68.04KB▼ 60.04%