84% simple-expand

Code Review | Simple Expand

WordPress plugin Simple Expand scored84%from 54 tests.

About plugin

  • Plugin page: simple-expand
  • Plugin version: 1.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: Feb 15, 2023
  • Number of updates: 8
  • Update frequency: every 46.4 days
  • Top authors: jonas.hjalmarsson (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,353 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.90ms] Passed 4 tests

Server-side resources used by Simple Expand
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.44 ▼8.09
Dashboard /wp-admin3.31 ▲0.0048.08 ▼8.22
Posts /wp-admin/edit.php3.36 ▲0.0048.02 ▼0.66
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.68 ▼30.64
Media Library /wp-admin/upload.php3.23 ▲0.0036.21 ▲0.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Expand
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.21 ▼0.392.43 ▲0.7640.07 ▼3.09
Dashboard /wp-admin2,195 ▲155.62 ▼0.0394.52 ▼11.5042.43 ▼2.17
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0540.79 ▲3.1436.79 ▲4.25
Add New Post /wp-admin/post-new.php1,535 ▲918.24 ▼4.73617.03 ▼77.1066.46 ▲14.01
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0099.18 ▼11.2642.89 ▼4.25

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function jhse\\add_shortcode() in wp-content/plugins/simple-expand/simple-expand.php:136

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: readmore, expand, toggle

simple-expand/simple-expand.php Passed 13 tests

The entry point to "Simple Expand" version 1.1 is a PHP file that has certain tags in its header comment area
78 characters long description:
Add shortcode [expand] to add a read more toggle functionality, pure HTML/CSS.

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
Everything looks great! No dangerous files found in this plugin87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1252787

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected