84% smart-wp

Code Review | Smart WordPress

WordPress plugin Smart WordPress scored84%from 54 tests.

About plugin

  • Plugin page: smart-wp
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8
  • WordPress version: 6.3.1
  • First release: Jan 29, 2017
  • Latest release: Aug 4, 2017
  • Number of updates: 5
  • Update frequency: every 36.8 days
  • Top authors: ggriesser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Smart WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▼1.71
Dashboard /wp-admin3.31 ▲0.0148.68 ▼7.94
Posts /wp-admin/edit.php3.36 ▲0.0153.74 ▲0.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.95 ▼20.40
Media Library /wp-admin/upload.php3.24 ▲0.0139.95 ▲2.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Smart WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.24 ▼0.111.67 ▲0.0638.74 ▼0.46
Dashboard /wp-admin2,210 ▲305.74 ▼0.0586.90 ▼2.7678.44 ▲32.84
Posts /wp-admin/edit.php2,112 ▲91.99 ▼0.0134.22 ▼7.9034.94 ▼3.10
Add New Post /wp-admin/post-new.php1,548 ▲323.24 ▼0.09737.69 ▲52.0162.16 ▲7.40
Media Library /wp-admin/upload.php1,418 ▲154.10 ▼0.13101.80 ▼2.9280.00 ▲34.37

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 did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 no errors were found, 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GeorgGriesser\\WordPress\\Smart_WP\\Header_Manager\\Header_Manager' not found in wp-content/plugins/smart-wp/src/Header_Manager/class-object-header-manager.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GeorgGriesser\\WordPress\\Smart_WP\\Header_Manager\\Header_Manager' not found in wp-content/plugins/smart-wp/src/Header_Manager/class-archive-header-manager.php:7

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

smart-wp/smart-wp.php Passed 13 tests

The principal PHP file in "Smart WordPress" v. 1.0.2 is loaded by WordPress automatically on each request
111 characters long description:
Optimize the caching behavior of your Website the easy way and reload pages only if something has been changed.

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
Good job! No executable or dangerous file extensions detected59,334 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript598543,31358,804
PHP11149111437
SVG10067
Markdown114026

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity6.22
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods37
▷ Static methods1951.35%
▷ Public methods2464.86%
▷ Protected methods25.41%
▷ Private methods1129.73%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
7 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/smart-wp-ohne.png10.90KB5.14KB▼ 52.82%
angular/backend/dist/assets/smart-wp-ohne.png10.90KB5.14KB▼ 52.82%
img/velocious-logo-yellow.png0.75KB0.72KB▼ 3.93%
img/slim-wp-ohne.png15.68KB5.79KB▼ 63.08%
angular/backend/dist/assets/slim-wp-ohne.png15.68KB5.79KB▼ 63.08%