77% minterpress

Code Review | Minterpress

WordPress plugin Minterpress scored77%from 54 tests.

About plugin

  • Plugin page: minterpress
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: Nov 23, 2022
  • Number of updates: 21
  • Update frequency: every 10.0 days
  • Top authors: blokhauswp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▼1.48ms] Passed 4 tests

Analyzing server-side resources used by Minterpress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6640.75 ▲2.55
Dashboard /wp-admin3.98 ▲0.6749.51 ▲0.28
Posts /wp-admin/edit.php4.03 ▲0.6749.85 ▼4.72
Add New Post /wp-admin/post-new.php6.75 ▲0.8696.64 ▼4.02
Media Library /wp-admin/upload.php3.90 ▲0.6741.58 ▲7.96

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Minterpress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.75 ▼0.607.71 ▲6.0268.29 ▲24.91
Dashboard /wp-admin2,230 ▲535.52 ▼0.1084.40 ▼2.6240.07 ▼4.75
Posts /wp-admin/edit.php2,135 ▲352.00 ▲0.0335.43 ▼8.0632.51 ▼5.78
Add New Post /wp-admin/post-new.php1,541 ▲1523.10 ▼0.07630.87 ▼20.1659.58 ▼3.18
Media Library /wp-admin/upload.php1,429 ▲294.34 ▲0.1694.72 ▼12.7842.45 ▼4.34

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • pinata_api_key
    • pinata_api_secret

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/minterpress/vendor/timber/timber/tests/bootstrap.php
    • > /wp-content/plugins/minterpress/vendor/timber/timber/tests/assets/my-sidebar.php
  • 396× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/minterpress/vendor/twig/twig/src/Node/CheckToStringNode.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/minterpress/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Timber\\Image\\Operation' not found in wp-content/plugins/minterpress/vendor/timber/timber/lib/Image/Operation/Resize.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/minterpress/vendor/composer/installers/src/Composer/Installers/AglInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Sandbox\\SecurityError' not found in wp-content/plugins/minterpress/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Timber_UnitTestCase' not found in wp-content/plugins/minterpress/vendor/timber/timber/tests/test-timber-sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\ReaderInterface' not found in wp-content/plugins/minterpress/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/minterpress/vendor/twig/twig/src/Extension/StringLoaderExtension.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/minterpress/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/minterpress/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% 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:
  • Contributors: No tags were detected
  • Requires at least: Invalid plugin version format
  • Contributors: Plugin contributors field is missing
The official readme.txt is a good inspiration

minterpress/minterpress.php Passed 13 tests

The entry point to "Minterpress" version 1.0.5 is a PHP file that has certain tags in its header comment area
47 characters long description:
Easily mint and display Tezos NFTs on WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin77,711 lines of code in 930 files:
LanguageFilesBlank linesComment linesLines of code
PHP7138,30514,41738,768
JSON170027,787
CSS71,7639774,945
Markdown341,17602,866
JavaScript422133061,311
Twig908991,192
Bourne Shell35219287
XML91952191
PO File16886180
YAML5160135
SVG80039
reStructuredText18510

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.64
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces57
Interfaces28
Traits0
Classes671
▷ Abstract classes162.38%
▷ Concrete classes65597.62%
▷ Final classes9113.89%
Methods2,892
▷ Static methods39013.49%
▷ Public methods2,55888.45%
▷ Protected methods1946.71%
▷ Private methods1404.84%
Functions364
▷ Named functions18149.73%
▷ Anonymous functions18350.27%
Constants105
▷ Global constants2019.05%
▷ Class constants8580.95%
▷ Public constants7385.88%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.37MB with 0.27MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/timber/timber/tests/assets/eastern-trans.png12.34KB7.39KB▼ 40.11%
vendor/timber/timber/tests/assets/cropper.png15.74KB0.31KB▼ 98.01%
(invalid) admin/views/images/tezos.png337.44KB0.00KB▼ 100.00%
vendor/timber/timber/tests/assets/flag.png10.33KB4.00KB▼ 61.24%