10% teportfolio

Code Review | tePortfolio - Responsive Portfolio and Gallery

WordPress plugin tePortfolio - Responsive Portfolio and Gallery scored10%from 54 tests.

About plugin

  • Plugin page: teportfolio
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2015
  • Latest release: Jul 25, 2015
  • Number of updates: 41
  • Update frequency: every 4.6 days
  • Top authors: trubine (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,988 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/teportfolio/includes/class.post-type-portfolio.php+409
    syntax error, unexpected end of file

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

Server-side resources used by tePortfolio - Responsive Portfolio and Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.45 ▼3.16
Dashboard /wp-admin3.31 ▲0.0043.98 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0047.89 ▼1.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.15 ▼3.61
Media Library /wp-admin/upload.php3.23 ▲0.0032.76 ▼0.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for tePortfolio - Responsive Portfolio and Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.821.80 ▲0.0941.42 ▼0.84
Dashboard /wp-admin2,206 ▲155.86 ▲0.05108.53 ▲1.8938.39 ▼6.72
Posts /wp-admin/edit.php2,095 ▲22.06 ▲0.0147.98 ▲11.8246.68 ▲16.64
Add New Post /wp-admin/post-new.php1,533 ▲1423.15 ▼0.16689.59 ▼1.6459.39 ▲2.45
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0996.99 ▼12.3443.03 ▼1.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/teportfolio/te-portfolio.php:35
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/teportfolio/includes/class.post-type-portfolio.php on line 409

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
The official readme.txt is a good inspiration

teportfolio/te-portfolio.php 92% from 13 tests

This is the main PHP file of "tePortfolio - Responsive Portfolio and Gallery" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("teportfolio.php" instead of "te-portfolio.php")

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
Good job! No executable or dangerous file extensions detected4,941 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript157579662,987
CSS569951,329
PHP358235531
HTML134884
SVG10110

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.00
▷ Minimum class complexity6.00
▷ Maximum class complexity24.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.48MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/litebox-prev.png51.08KB0.54KB▼ 98.94%
img/social/youtube.png2.16KB1.85KB▼ 14.53%
img/img.png22.18KB7.17KB▼ 67.69%
banner-772x250.png274.96KB100.71KB▼ 63.37%
img/social/linkedin.png2.51KB2.25KB▼ 10.27%