83% ammu-demo-import

Code Review | Ammu Demo Import

WordPress plugin Ammu Demo Import scored83%from 54 tests.

About plugin

  • Plugin page: ammu-demo-import
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Apr 13, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 10
  • Update frequency: every 58.0 days
  • Top authors: ponvendhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /7,499 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Ammu Demo Import
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.92 ▲7.13
Dashboard /wp-admin3.31 ▲0.0044.86 ▼5.16
Posts /wp-admin/edit.php3.36 ▲0.0048.30 ▲1.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.23 ▼9.06
Media Library /wp-admin/upload.php3.23 ▲0.0032.48 ▼3.15

Server storage [IO: ▲25.80MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 25.80MB)
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Ammu Demo Import
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.67 ▲0.571.69 ▼0.1040.08 ▼3.66
Dashboard /wp-admin2,195 ▲215.63 ▲0.0484.95 ▼15.6437.80 ▼4.73
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0039.68 ▲2.2035.19 ▲0.93
Add New Post /wp-admin/post-new.php1,526 ▼023.29 ▲0.05640.13 ▼54.7852.16 ▼2.22
Media Library /wp-admin/upload.php1,400 ▼04.40 ▲0.2496.44 ▼11.9642.65 ▼3.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ammu-demo-import/ammu-demo-import.php
    • > /wp-content/plugins/ammu-demo-import/inc/store-expert-functions.php
    • > /wp-content/plugins/ammu-demo-import/inc/real-estate-salient-functions.php
    • > /wp-content/plugins/ammu-demo-import/inc/real-estate-calibre-functions.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: import, demo, data, themes, widgets...

ammu-demo-import/ammu-demo-import.php 92% from 13 tests

The main PHP script in "Ammu Demo Import" version 1.0.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected211,552 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
XML3312517211,225
PHP57790327

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 4.63MB with 3.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ocdi/real-estate-calibre/demo1/demo1.png1,132.88KB335.99KB▼ 70.34%
ocdi/real-estate-salient/demo2/demo2.png457.12KB117.81KB▼ 74.23%
ocdi/real-estate-calibre/demo2/demo2.png1,361.49KB363.14KB▼ 73.33%
ocdi/store-expert/demo1/demo1.png757.91KB207.17KB▼ 72.67%
ocdi/store-expert/demo2/demo2.png852.89KB233.75KB▼ 72.59%