84% wp-scap

Code Review | SCAP - Shutterstock Custom Affiliate Plugin

WordPress plugin SCAP - Shutterstock Custom Affiliate Plugin scored84%from 54 tests.

About plugin

  • Plugin page: wp-scap
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9
  • WordPress version: 6.3.1
  • First release: Jun 1, 2014
  • Latest release: Jun 1, 2014
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: arifin4web (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲0.75ms] Passed 4 tests

A check of server-side resources used by SCAP - Shutterstock Custom Affiliate Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0844.08 ▲6.67
Dashboard /wp-admin3.45 ▲0.1155.89 ▲5.68
Posts /wp-admin/edit.php3.57 ▲0.1748.49 ▲0.29
Add New Post /wp-admin/post-new.php6.03 ▲0.1181.76 ▼6.38
Media Library /wp-admin/upload.php3.38 ▲0.1138.85 ▲3.39

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
scap_options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

SCAP - Shutterstock Custom Affiliate Plugin: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲12213.77 ▼0.329.39 ▲7.5942.88 ▼1.64
Dashboard /wp-admin2,203 ▲265.56 ▼0.1096.74 ▲10.2182.12 ▲45.28
Posts /wp-admin/edit.php2,111 ▲82.01 ▲0.0534.72 ▼1.8234.85 ▼1.55
Add New Post /wp-admin/post-new.php1,552 ▲1522.95 ▲4.79717.81 ▲92.1754.96 ▼11.95
Media Library /wp-admin/upload.php1,411 ▲84.27 ▲0.06101.40 ▲2.0370.26 ▲26.23

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • scap_options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-scap/admin/views/admin.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: shutterstock

wp-scap/wp-scap.php 85% from 13 tests

The main file in "SCAP - Shutterstock Custom Affiliate Plugin" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 567 characters long)
  • 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 a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected772 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP9211646523
JavaScript1443143
Markdown135061
PO File1111339
CSS1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.40
▷ Minimum class complexity3.00
▷ Maximum class complexity26.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods714.89%
▷ Public methods2757.45%
▷ Protected methods12.13%
▷ Private methods1940.43%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/icon.png0.28KB0.22KB▼ 19.86%