83% wopo-calculator

Code Review | WoPo Calculator

WordPress plugin WoPo Calculator scored83%from 54 tests.

About plugin

  • Plugin page: wopo-calculator
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 17, 2021
  • Latest release: Jul 17, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /287 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by WoPo Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.92 ▼5.85
Dashboard /wp-admin3.31 ▲0.0148.41 ▼7.79
Posts /wp-admin/edit.php3.37 ▲0.0145.28 ▼8.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.16 ▼7.22
Media Library /wp-admin/upload.php3.24 ▲0.0132.80 ▲1.95

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 184 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WoPo Calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.041.61 ▼0.0438.74 ▼6.31
Dashboard /wp-admin2,195 ▲155.55 ▼0.1081.48 ▼16.9936.96 ▼5.12
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0132.88 ▼4.9436.08 ▲0.38
Add New Post /wp-admin/post-new.php1,535 ▲118.19 ▲0.05612.99 ▼45.5466.32 ▲1.06
Media Library /wp-admin/upload.php1,400 ▼04.20 ▲0.0596.93 ▲2.1342.23 ▼1.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wopo-calculator/wopo-calculator.php:21

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: javascript, wopo calculator, online, calculator, app...

wopo-calculator/wopo-calculator.php 77% from 13 tests

"WoPo Calculator" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "5.2")
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.2.4" instead of "7.1")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin40,258 lines of code in 127 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript272,6307,78125,294
C++341,6012,5267,979
C/C++ Header303753902,590
CSS1194941,619
Markdown112090954
JSON300547
XML201513
HTML3922375
SVG100278
CMake311355
PHP141439
Bourne Shell11015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions3
▷ Named functions3100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
26 PNG files occupy 0.66MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
html/app/mcalculator/server/public/Images/808ab329-46e7-5e3d-a5a9-178d7c3949a1.webPlatform.png1.64KB1.58KB▼ 3.92%
html/app/mcalculator/server/public/Images/9b51305a-80ec-7735-fe39-52dfc09ffc3a.webPlatform.png2.42KB1.93KB▼ 20.22%
html/app/mcalculator/server/public/Images/eca1d252-e2aa-60bf-b92a-0c061bb25046.webPlatform.png4.71KB2.79KB▼ 40.67%
html/app/mcalculator/server/public/Images/928fc572-71e2-9ee5-88c6-d7fe4039bc09.webPlatform.png5.22KB3.11KB▼ 40.33%
html/app/mcalculator/server/public/Images/c58c078a-cbaa-5b6e-ab1f-664818f3623d.webPlatform.png2.35KB1.89KB▼ 19.34%