84% wp-site-portfolio

Code Review | Wp Site portfolio

WordPress plugin Wp Site portfolio scored84%from 54 tests.

About plugin

  • Plugin page: wp-site-portfolio
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: Jun 12, 2019
  • Number of updates: 23
  • Update frequency: every 20.5 days
  • Top authors: ronena100 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,006 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.38ms] Passed 4 tests

A check of server-side resources used by Wp Site portfolio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.24 ▲4.83
Dashboard /wp-admin3.48 ▲0.1351.68 ▼7.66
Posts /wp-admin/edit.php3.60 ▲0.2449.57 ▲0.44
Add New Post /wp-admin/post-new.php6.05 ▲0.1680.14 ▼11.98
Media Library /wp-admin/upload.php3.39 ▲0.1536.42 ▲1.70
Categories /wp-admin/edit-tags.php?taxonomy=sitecategory&post_type=sites3.4137.72
Add New /wp-admin/post-new.php?post_type=sites3.4647.88
Site Portfolio Settings /wp-admin/edit.php?post_type=sites&page=site_portfolio_settings3.3936.11
Sites Portfolio /wp-admin/edit.php?post_type=sites3.4638.67

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

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

Browser metrics Passed 4 tests

Wp Site portfolio: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,064 ▲30715.26 ▲0.486.40 ▲4.3542.88 ▼6.88
Dashboard /wp-admin2,381 ▲1936.47 ▲0.57138.01 ▲30.3640.32 ▼6.11
Posts /wp-admin/edit.php2,287 ▲1983.30 ▲1.2949.88 ▲12.7732.66 ▼2.03
Add New Post /wp-admin/post-new.php1,557 ▲3823.30 ▲0.12631.46 ▼43.4337.54 ▼16.03
Media Library /wp-admin/upload.php1,423 ▲324.16 ▼0.0683.71 ▼21.8242.14 ▼3.83
Categories /wp-admin/edit-tags.php?taxonomy=sitecategory&post_type=sites1,4623.1241.1727.46
Add New /wp-admin/post-new.php?post_type=sites1,7813.6865.8931.86
Site Portfolio Settings /wp-admin/edit.php?post_type=sites&page=site_portfolio_settings1,1093.0341.0166.24
Sites Portfolio /wp-admin/edit.php?post_type=sites1,2633.3247.1925.94

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

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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-portfolio/admin/function-admin.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-portfolio/includes/wpspf-cpt-fields.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/wp-site-portfolio/admin/wpspf-settings-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-portfolio/includes/wpspf-cpt.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-site-portfolio/includes/function-wpspf.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-site-portfolio/includes/templates/wpspf-shortcode.php:114

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Requires php: Invalid plugin version format
The official readme.txt might help

wp-site-portfolio/wp-site-portfolio.php Passed 13 tests

This is the main PHP file of "Wp Site portfolio" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
Show you work to potential customers

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,226 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9157119611
CSS25026266
PO File18788200
JavaScript2212149

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.93MB with 0.61MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-3.png394.83KB132.34KB▼ 66.48%
assets/Screenshot-2.png312.26KB103.83KB▼ 66.75%
assets/Screenshot-4.png80.10KB28.24KB▼ 64.75%
assets/Screenshot-1.png119.87KB36.08KB▼ 69.90%
includes/img/logoW.png46.73KB18.11KB▼ 61.25%