84% instructables

Code Review | Instructables

WordPress plugin Instructables scored84%from 54 tests.

About plugin

  • Plugin page: instructables
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2014
  • Latest release: Aug 6, 2017
  • Number of updates: 22
  • Update frequency: every 43.5 days
  • Top authors: ukthebunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,442 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.75ms] Passed 4 tests

An overview of server-side resources used by Instructables
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.21 ▼2.11
Dashboard /wp-admin3.34 ▲0.0444.38 ▼5.40
Posts /wp-admin/edit.php3.46 ▲0.1047.52 ▼0.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.65 ▼2.75
Media Library /wp-admin/upload.php3.27 ▲0.0437.29 ▲2.51
Instructables Feeds /wp-admin/edit.php?post_type=instructables_sc3.3134.23
Settings /wp-admin/admin.php?page=instructables_options3.2332.76
Instructables /wp-admin/admin.php?page=instructables_config3.2331.71
Add New Instructable Feed /wp-admin/post-new.php?post_type=instructables_sc3.3145.49

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Instructables
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10713.24 ▼1.124.27 ▲2.0240.49 ▼9.78
Dashboard /wp-admin2,243 ▲555.82 ▼0.02108.65 ▼6.6987.01 ▲43.29
Posts /wp-admin/edit.php2,142 ▲502.02 ▼0.0139.46 ▲2.4335.97 ▲1.79
Add New Post /wp-admin/post-new.php1,708 ▲16624.71 ▲6.30705.70 ▲106.1055.84 ▲2.29
Media Library /wp-admin/upload.php1,428 ▲374.11 ▼0.19100.67 ▲3.5281.37 ▲35.37
Instructables Feeds /wp-admin/edit.php?post_type=instructables_sc1,0981.9332.7129.21
Settings /wp-admin/admin.php?page=instructables_options8102.2124.9826.42
Instructables /wp-admin/admin.php?page=instructables_config8962.1425.7526.78
Add New Instructable Feed /wp-admin/post-new.php?post_type=instructables_sc1,5652.5048.1158.18

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/instructables/button.js.php
    • > /wp-content/plugins/instructables/instructables.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

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
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === instructables === )
You can look at the official readme.txt

instructables/instructables.php Passed 13 tests

This is the main PHP file of "Instructables" version 2.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
66 characters long description:
Display Instructables Projects on your site linking to the source.

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
No dangerous file extensions were detected798 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP298119742
CSS18344
Markdown16012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods833.33%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.96MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png67.59KB29.07KB▼ 56.99%
assets/screenshot-2.png218.14KB74.86KB▼ 65.68%
assets/screenshot-5.png65.84KB27.44KB▼ 58.32%
assets/banner-772x250.png83.97KB31.44KB▼ 62.56%
images/robot.png98.60KB29.30KB▼ 70.28%