62% moredeal-ai-writer

Code Review | Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template

WordPress plugin Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template scored62%from 54 tests.

About plugin

  • Plugin page: moredeal-ai-writer
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2023
  • Latest release: Jun 17, 2023
  • Number of updates: 48
  • Update frequency: every 2.3 days
  • Top authors: df007df (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,391 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.51ms] Passed 4 tests

A check of server-side resources used by Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3640.65 ▼1.59
Dashboard /wp-admin3.61 ▲0.3146.93 ▲0.57
Posts /wp-admin/edit.php3.72 ▲0.3751.14 ▲5.05
Add New Post /wp-admin/post-new.php6.20 ▲0.3186.06 ▼0.97
Media Library /wp-admin/upload.php3.54 ▲0.3136.49 ▼0.04
Use Limit /wp-admin/admin.php?page=moredeal-ai-writer-uselimit3.5433.77
Moredeal AI Writer /wp-admin/admin.php?page=moredeal-ai-writer3.5131.91
Service /wp-admin/admin.php?page=moredeal-ai-writer-service3.5132.24
License /wp-admin/admin.php?page=moredeal-ai-writer-license3.5538.54
Token Recharge /wp-admin/admin.php?page=moredeal-ai-writer-token3.65354.58
Settings /wp-admin/admin.php?page=moredeal-ai-writer-settings3.5533.63

Server storage [IO: ▲11.47MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 349 new files
Database: 4 new tables, 14 new options
New tables
wp_moredeal_aigc_uselimit
wp_moredeal_aigc_log
wp_moredeal_aigc_template
wp_moredeal_aigc_template_download
New WordPress options
moredeal_aigc_db_version
moredeal_aigc_settings
moredeal_aigc_token
moredeal_aigc_license
widget_recent-comments
moredeal_aigc_service
moredeal_aigc_account
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.22 ▼1.561.57 ▼0.3941.61 ▼0.26
Dashboard /wp-admin2,257 ▲695.82 ▲0.01106.30 ▼9.3973.72 ▲29.75
Posts /wp-admin/edit.php2,143 ▲512.10 ▲0.1052.76 ▲15.5537.06 ▲2.78
Add New Post /wp-admin/post-new.php1,557 ▲2423.35 ▲0.29753.28 ▲87.5160.10 ▲2.61
Media Library /wp-admin/upload.php1,436 ▲484.18 ▼0.0495.66 ▼2.0269.70 ▲28.95
Use Limit /wp-admin/admin.php?page=moredeal-ai-writer-uselimit1,7717.65153.2790.18
Moredeal AI Writer /wp-admin/admin.php?page=moredeal-ai-writer1,19910.30140.49150.20
Service /wp-admin/admin.php?page=moredeal-ai-writer-service1,5245.7597.2835.13
License /wp-admin/admin.php?page=moredeal-ai-writer-license1,0052.1341.9256.60
Token Recharge /wp-admin/admin.php?page=moredeal-ai-writer-token1,0282.4241.9137.71
Settings /wp-admin/admin.php?page=moredeal-ai-writer-settings1,0172.0839.6633.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables were found after uninstall: 4 tables
    • wp_moredeal_aigc_template_download
    • wp_moredeal_aigc_template
    • wp_moredeal_aigc_uselimit
    • wp_moredeal_aigc_log
  • Zombie WordPress options detected upon uninstall: 13 options
    • moredeal_aigc_first_activation_date
    • db_upgraded
    • moredeal_aigc_service
    • moredeal_aigc_account
    • widget_theysaidso_widget
    • moredeal_aigc_settings
    • moredeal_aigc_uselimit
    • moredeal_aigc_license
    • theysaidso_admin_options
    • widget_recent-posts
    • ...

Smoke tests 25% 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)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/moredeal-ai-writer/moredeal-ai-writer.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'MoredealAiWriter\\code\\modules\\extend\\AbstractBaseExtend' not found in wp-content/plugins/moredeal-ai-writer/code/modules/extend/SceneExtend.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'MoredealAiWriter\\application\\controller\\AbstractApiController' not found in wp-content/plugins/moredeal-ai-writer/application/controller/ServiceApiController.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'MoredealAiWriter\\code\\modules\\step\\AbstractStepModule' not found in wp-content/plugins/moredeal-ai-writer/code/modules/step/SearchProductStepModule.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'MoredealAiWriter\\application\\controller\\AbstractApiController' not found in wp-content/plugins/moredeal-ai-writer/application/controller/UseLimitApiController.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=moredeal-ai-writer-uselimit
    • > Console-api (severe) in unknown
    /wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400 6:25078 TypeError: Cannot read properties of undefined (reading 'total_token_usage')at o.z (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/limits.js?ver=1.2.0-1696595400:1:13016)at Oi.t._render (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:21961)at o.n (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:32050)at t.get (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:28259)at t.run (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:28996)at Jn (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:34236)at Array. (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:25799)at Yi (/wp-content/plugins/moredeal-ai-writer/res/admin/limit/chunk-vendors.js?ver=1.2.0-1696595400:7:25194)
    • > GET request to /wp-admin/admin.php?page=moredeal-ai-writer-uselimit
    • > Javascript (severe) in unknown
    /wp-content/plugins/moredeal-ai-writer/res/admin/limit/limits.js?ver=1.2.0-1696595400 0:19964 Uncaught TypeError: Cannot read properties of undefined (reading 'list')

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: You can look at the official readme.txt

moredeal-ai-writer/moredeal-ai-writer.php Passed 13 tests

"Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
114 characters long description:
Moredeal AI Writer - GPT Content Generator, Custom AI Template & AI Forms & Prompt Template Market & Sell Template

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected22,530 lines of code in 267 files:
LanguageFilesBlank linesComment linesLines of code
PHP1714,78410,05717,591
PO File39592131,896
JavaScript612151901,484
CSS17262181,421
JSON31082
SVG1030054
HTML2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.92
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces34
Interfaces1
Traits0
Classes164
▷ Abstract classes1710.37%
▷ Concrete classes14789.63%
▷ Final classes00.00%
Methods1,185
▷ Static methods40033.76%
▷ Public methods99483.88%
▷ Protected methods14612.32%
▷ Private methods453.80%
Functions13
▷ Named functions17.69%
▷ Anonymous functions1292.31%
Constants212
▷ Global constants83.77%
▷ Class constants20496.23%
▷ Public constants204100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
chat/apple-touch-icon.png11.30KB4.76KB▼ 57.88%
chat/favicon-32x32.png1.51KB1.06KB▼ 29.95%
chat/android-chrome-192x192.png12.39KB5.34KB▼ 56.85%
(invalid) res/images/moredeal_ai_writer.png31.96KB0.00KB▼ 100.00%
chat/android-chrome-512x512.png23.67KB8.52KB▼ 64.02%